Skip to content

Commit

Permalink
iCalcreator-2.29.15
Browse files Browse the repository at this point in the history
  • Loading branch information
iCalcreator committed Jan 20, 2020
1 parent af69b2c commit f66748d
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 55 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,17 @@ iCalcreator supports systems like
* other applications...
~~~~~~~~
__Builds__
###### Builds

Please review the releaseNotes for a brief overview,
docs/summary and docs/using for details.

Stable 2.28.2 *(master)*.

Release 2.30 candidate (2.29.14)
Release 2.30 candidate (tag 2.29.15)

Unsupported (tags):
- 2.26.9
- 2.24.2
- 2.22.5


Brief 2.29.9 demo :
###### Usage

``` php
<?php
Expand Down
8 changes: 4 additions & 4 deletions autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
*
* copyright (c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* copyright (c) 2007-2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* Link https://kigkonsult.se
* Package iCalcreator
* Version 2.29.14
* Version 2.29.15
* License Subject matter of licence is the software iCalcreator.
* The above copyright, link, package and version notices,
* this licence notice and the invariant [rfc5545] PRODID result use
Expand Down Expand Up @@ -33,12 +33,12 @@
* iCalcreator package autoloader
*
* @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
* @since 2.29.14 - 2019-09-04
* @since 2.29.15 - 2020-01-19
*/
/**
* Do NOT alter or remove the constant!!
*/
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.29.14' );
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.29.15' );
/**
* load iCalcreator src and support classes and Traits
*/
Expand Down
44 changes: 21 additions & 23 deletions docs/using.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html><!--
iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
copyright (c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
copyright (c) 2007-2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
Link https://kigkonsult.se
Package iCalcreator
Version 2.29.14
Version 2.29.15
License Subject matter of licence is the software iCalcreator.
The above copyright, link, package and version notices,
this licence notice and the invariant [rfc5545] PRODID result use
Expand All @@ -28,12 +28,12 @@
-->
<html lang="en">
<head>
<title>iCalcreator 2.29.14 manual</title>
<title>iCalcreator 2.29.15 manual</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="author" content="Kjell-Inge Gustafsson, kigkonsult, All rights reserved">
<meta name="copyright" content="2007-2019 Kjell-Inge Gustafsson, kigkonsult">
<meta name="copyright" content="2007-2020 Kjell-Inge Gustafsson, kigkonsult">
<meta name="keywords" content="ical, calendar, calender, xcal, xml, icalender, rfc2445, rfc5545, vcalender, php, create">
<meta name="description" content="using iCalcreator v2.29.14">
<meta name="description" content="using iCalcreator v2.29.15">
<style type="text/css">
* {
FONT-FAMILY : "Bitstream Vera Sans", Helvetica, "Lucida Grande","Lucida Sans Unicode", Lucida, Arial, Geneva, sans-serif;
Expand Down Expand Up @@ -158,10 +158,10 @@
</head>
<body>
<a name="top"></a>
<p class="header">iCalcreator v2.29.14</p>
<p class="header">iCalcreator v2.29.15</p>
<p>
iCalcreator v2.29.14<br>
Copyright &copy; 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
iCalcreator v2.29.15<br>
Copyright &copy; 2007-2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
<a href="#Copyright_and_Licence">Copyright_and_Licence</a><br>
<a href="https://kigkonsult.se" title="kigkonsult.se" target="_blank">kigkonsult.se</a><br>
Contact iCal_at_kigkonsult_dot_se
Expand Down Expand Up @@ -210,7 +210,7 @@ <h2>Preface</h2>
iCalcreator features create, parse, edit and select <strong>calendar</strong> and <strong>calendar</strong> components.
</p>
<p>
For iCalcreator 2.29.14 version (and later), <em>PHP</em> version &gt;= 5.6 is required.
For iCalcreator 2.29.15 version (and later), <em>PHP</em> version &gt;= 5.6 is required.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
Expand Down Expand Up @@ -298,7 +298,7 @@ <h4>xCal</h4>

<a name="Support"></a><h2>1.4 Support</h2>
<p>
For support report, use <a href="https://github.com/iCalcreator/iCalcreator/issues" title="kigkonsult.se issues" target="_blank"> github issues</a>.
For bug report or support request, use <a href="https://github.com/iCalcreator/iCalcreator/issues" title="kigkonsult.se issues" target="_blank"> github issues</a>.
</p>
<p>
For non emergency issues, support upon (paid) request only.
Expand Down Expand Up @@ -335,11 +335,11 @@ <h4>xCal</h4>
<dt>Or
<dd> include the (download) iCalcreator folder to your include-path
<dd>Add
<dd><span class="format">require_once &quot;[path/]iCalcreator-2.29.14/autoload.php&quot;;</span>
<dd><span class="format">require_once &quot;[path/]iCalcreator-2.29.15/autoload.php&quot;;</span>
<dd>to your <em>PHP</em>-script.
</dl>
<p>
iCalcreator 2.29.14 is using namespace &quot;Kigkonsult\Icalcreator&quot;.
iCalcreator 2.29.15 is using namespace &quot;Kigkonsult\Icalcreator&quot;.
</p>

<br>
Expand Down Expand Up @@ -2816,7 +2816,7 @@ <h5>Set X-PROPERTY</h5>

$str = [
&quot;BEGIN:VCALENDAR&quot;,
&quot;PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.29.14//&quot;,
&quot;PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.29.15//&quot;,
&quot;VERSION:2.0&quot;,
&quot;BEGIN:VEVENT&quot;,
&quot;DTSTART:20101224T190000Z&quot;,
Expand Down Expand Up @@ -2868,25 +2868,23 @@ <h5>Set X-PROPERTY</h5>
<a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
<p>
Redirect the Vcalendar instance content to user browser.
Filename, addressed to browser, is automatically generated if missing or not set
and the filename will look like it is set using<br>
Filename, addressed to browser, is automatically generated if missing or not set,
the filename will look like it is set using<br>
</p>
<p class="example">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot;</p>
<p>
The method do not stop PHP script (exit), returns (bool) true on success.
</p>
<p>
Note, the returnCalendar method is subject for change in future versions.
</p>
<p class="label">Format</p>
<p class="format">Vcalendar::returnCalendar( [ utf8Encode [, gzip [, cdType ]]] )</p>
<p class="format">Vcalendar::returnCalendar( [ utf8Encode [, gzip [, cdType [, fileName ]]]] )</p>
<p class="comment">utf8Encode = (bool) true: utf8 encoded output,
false: (default) no encoding
gzip = (bool) true: gzip compressed output
Header &quot;Content-Length&quot; only sent when gzip=true
false: (default) no compressing
cdType = (bool) true: (default) Content-Disposition: attachment
false: Content-Disposition: inline</p>
false: Content-Disposition: inline
fileName = (string) returned file Name</p>
<p class="label">Example 1</p>
<p class="example">use Kigkonsult\Icalcreator\Vcalendar;

Expand Down Expand Up @@ -8152,7 +8150,7 @@ <h5>Set LANGUAGE</h5>

<a name="vtimezone_populate"></a><h4>3.4.4 Vtimezone populate</h4>
<p>
The Util/VtimezonePopulateFactory::process (static) method,
The Util/VtimezonePopulateFactory::process (static) method,
applied on a Vcalendar instance,
return the Vcalendar instance with <a href="#VTIMEZONE">Vtimezone</a>,
<a href="#VTIMEZONE">Standard</a> and <a href="#VTIMEZONE">Daylight</a> components,
Expand Down Expand Up @@ -8405,10 +8403,10 @@ <h5>Set LANGUAGE</h5>
<a name="Copyright_and_Licence"></a><h1>5 COPYRIGHT AND LICENSE</h1>

<table>
<tr><td>Copyright<td>(c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
<tr><td>Copyright<td>(c) 2007-2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
<tr><td>Link <td>https://kigkonsult.se
<tr><td>Package <td>iCalcreator
<tr><td>Version <td>2.29.14
<tr><td>Version <td>2.29.15
<tr><td class="top">License <td>
Subject matter of licence is the software iCalcreator.<br>
The above copyright, link, package and version notices,<br>
Expand Down
4 changes: 3 additions & 1 deletion releaseNotes-2.29
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

iCalcreator 2.29.14 releaseNotes
iCalcreator 2.29.15 releaseNotes

v2.29.1 Removal of all set-methods date(time)/interval ARRAY arguments
as well as get-methods return date(time)/interval ARRAY formats
Expand Down Expand Up @@ -64,3 +64,5 @@ v2.29.12 Vtimezone::populate() moved to Util/VtimezonePopulateFactory::process(
v2.29.13 CATEGORIES, RESOURCES no longer accepts array input

v2.29.14 String asserts in set-methods for TEXT Valuetype properties

v2.29.15 Vcalendar::returnCalendar() new fileName arg
6 changes: 3 additions & 3 deletions src/IcalBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
*
* copyright (c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* copyright (c) 2007-2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* Link https://kigkonsult.se
* Package iCalcreator
* Version 2.29.14
* Version 2.29.15
* License Subject matter of licence is the software iCalcreator.
* The above copyright, link, package and version notices,
* this licence notice and the invariant [rfc5545] PRODID result use
Expand Down Expand Up @@ -58,7 +58,7 @@
* Do NOT alter or remove the constant!!
*/
if( ! defined( 'ICALCREATOR_VERSION' )) {
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.29.14' );
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.29.15' );
}

/**
Expand Down
22 changes: 15 additions & 7 deletions src/Util/HttpFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
*
* copyright (c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* copyright (c) 2007-2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* Link https://kigkonsult.se
* Package iCalcreator
* Version 2.29.14
* Version 2.29.15
* License Subject matter of licence is the software iCalcreator.
* The above copyright, link, package and version notices,
* this licence notice and the invariant [rfc5545] PRODID result use
Expand Down Expand Up @@ -51,10 +51,10 @@
use function utf8_encode;

/**
* iCalcreator http support class, also rfc2368 support (iCal cal-address)
* iCalcreator http support class
*
* @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
* @since 2.29.4 - 2019-07-02
* @since 2.29.15 - 2020-01-19
*/
class HttpFactory
{
Expand Down Expand Up @@ -82,18 +82,26 @@ class HttpFactory
* @param bool $utf8Encode
* @param bool $gzip
* @param bool $cdType true : Content-Disposition: attachment... (default), false : ...inline...
* @param string $fileName
* @return bool true on success, false on error
* @throws Exception
* @static
* @since 2.29.15 - 2020-01-19
*/
public static function returnCalendar(
Vcalendar $calendar,
$utf8Encode = false,
$gzip = false,
$cdType = true
$cdType = true,
$fileName = null
) {
static $ICR = 'iCr';
$filename = self::getFakedFilename();
$utf8Encode ?: false;
$gzip ?: false;
$cdType ?: false;
if( empty( $fileName ) ) {
$fileName = self::getFakedFilename();
}
$output = $calendar->createCalendar();
if( $utf8Encode ) {
$output = utf8_encode( $output );
Expand All @@ -119,7 +127,7 @@ public static function returnCalendar(
}
header( self::$headers[3] );
$cdType = ( $cdType ) ? 4 : 5;
header( sprintf( self::$headers[$cdType], $filename ));
header( sprintf( self::$headers[$cdType], $fileName ));
header( self::$headers[6] );
echo $output;
return true;
Expand Down
19 changes: 10 additions & 9 deletions src/Vcalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
*
* copyright (c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* copyright (c) 2007-2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
* Link https://kigkonsult.se
* Package iCalcreator
* Version 2.29.14
* Version 2.29.15
* License Subject matter of licence is the software iCalcreator.
* The above copyright, link, package and version notices,
* this licence notice and the invariant [rfc5545] PRODID result use
Expand Down Expand Up @@ -70,7 +70,7 @@
* Vcalendar class
*
* @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
* @since 2.29.5 - 2019-06-30
* @since 2.29.15 - 2020-01-19
*/
final class Vcalendar extends IcalBase
{
Expand Down Expand Up @@ -918,15 +918,16 @@ public function createCalendar() {
* Return created, updated and/or parsed calendar,
* sending a HTTP redirect header.
*
* @param bool $utf8Encode
* @param bool $gzip
* @param bool $cdType true : Content-Disposition: attachment... (default), false : ...inline...
* @param bool $utf8Encode
* @param bool $gzip
* @param bool $cdType true : Content-Disposition: attachment... (default), false : ...inline...
* @param string $fileName
* @return bool true on success, false on error
* @throws Exception
* @since 2.27.2 - 2018-12-21
* @since 2.29.15 - 2020-01-19
*/
public function returnCalendar( $utf8Encode = false, $gzip = false, $cdType = true ) {
return HttpFactory::returnCalendar( $this, $utf8Encode, $gzip, $cdType );
public function returnCalendar( $utf8Encode = false, $gzip = false, $cdType = true, $fileName = null ) {
return HttpFactory::returnCalendar( $this, $utf8Encode, $gzip, $cdType, $fileName );
}

}

0 comments on commit f66748d

Please sign in to comment.