Add upstream plugins

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-10-25 22:42:20 +02:00
parent 5d3c2ec184
commit 290736650a
1186 changed files with 302577 additions and 0 deletions

View File

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -0,0 +1,682 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!--
iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
This file is a part of iCalcreator.
copyright (c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
Link https://kigkonsult.se
Package iCalcreator
Version 2.26.8
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
as implemented and invoked in iCalcreator shall be included in
all copies or substantial portions of the iCalcreator.
iCalcreator is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
iCalcreator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with iCalcreator. If not, see <https://www.gnu.org/licenses/>.
-->
<html>
<head>
<title>iCalcreator 2.26.8 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="keywords" content="ical, calendar, calender, xcal, xml, icalender, rfc2445, rfc5545, vcalender, php, create">
<meta name="description" content="using iCalcreator v2.26.8">
<style type="text/css">
* {
FONT-FAMILY : "Bitstream Vera Sans", Helvetica, "Lucida Grande","Lucida Sans Unicode", Lucida, Arial, Geneva, sans-serif;
BACKGROUND-COLOR: white;
COLOR : black;
FONT-SIZE : small;
}
body {
MARGIN-LEFT : 10px;
WIDTH : 750px;
}
h1 {
BACKGROUND-COLOR: silver;
BORDER : thin solid black;
FONT-SIZE : x-large;
FONT-WEIGHT : bold;
DISPLAY : block;
}
h2 {
FONT-SIZE : large;
}
h3 {
FONT-SIZE : medium;
}
h4 {
FONT-SIZE : small;
FONT-WEIGHT : bold;
}
h5 {
FONT-SIZE : small;
FONT-WEIGHT : normal;
TEXT-DECORATION : underline;
}
table {
border-collapse : collapse;
width : 100%;
}
p.comment {
FONT-FAMILY : monospace;
FONT-SIZE : 9pt;
FONT-WEIGHT : 500;
WHITE-SPACE : pre-wrap; /* css-3 */
WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
}
span.comment {
BACKGROUND-COLOR: inherit;
FONT-FAMILY : Areal;
FONT-SIZE : 8pt;
LETTER-SPACING : 0.2em;
}
p.example {
BACKGROUND-COLOR: #DCDCDC;
font-family : monospace;
FONT-SIZE : 9pt;
LETTER-SPACING : 0.1em;
LINE-HEIGHT : 1.5em;
WHITE-SPACE : pre-wrap; /* css-3 */
WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
}
p.format, span.format {
BORDER : gray dotted thin;
FONT-FAMILY : Helvetica;
FONT-SIZE : 9pt;
LETTER-SPACING : 0.2em;
LINE-HEIGHT : 2em;
WHITE-SPACE : pre-wrap; /* css-3 */
WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
}
.header {
BACKGROUND-COLOR: silver;
BORDER : thin solid black;
FONT-SIZE : xx-large;
}
p.quotes {
BACKGROUND-COLOR: #F5F5F5;
FONT-FAMILY : Arial;
FONT-STYLE : italic;
LETTER-SPACING : 0.1em;
}
sup {
BACKGROUND-COLOR: transparent;
FONT-SIZE : x-small;
FONT-WEIGHT : bold;
VERTICAL-ALIGN : super;
}
.top {
VERTICAL-ALIGN : top;
}
</style>
</head>
<body>
<a name="top"></a>
<p class="header">iCalcreator v2.26.8</p>
<p>
iCalcreator v2.26.8<br>
Copyright &copy; 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
Contact : iCal_at_kigkonsult_dot_se
</p>
<h2>Preface</h2>
<p>
This document describes usage of iCalcreator, the <em>PHP</em> software implementation of standards
<a href="https://tools.ietf.org/html/rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a>/
<a href="https://tools.ietf.org/html/rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
(rfc2445/rfc2446) to manage iCal formatted files.
</p>
<p>
This document is provided by kigkonsult for informational purposes
and is provided on an &quot;as is&quot; basis without any warranties expressed or implied.
</p>
<p>
Information in this document is subject to change without notice and does
not represent a commitment on the part of kigkonsult.
The software described in this document is provided under a <a href="#Copyright_and_Licence">license agreement</a>.
The software may be used only in accordance with the terms of that <a href="#Copyright_and_Licence">license agreement</a>.
It is against the law to copy or use the software except as specifically allowed in the <a href="#Copyright_and_Licence">license agreement</a>.
</p>
<p>
It is the users responsibility to ensure the suitability of the software before using it.
In no circumstances will kigkonsult be responsible for
the use of the software's outcomes or results or any loss
or damage of data or programs as a result of using the software.
</p>
<p>
The use of the software implies acceptance of these terms and the <a href="#Copyright_and_Licence">license</a>.
</p>
<p>
This document makes previous versions obsolete.
</p>
<h4>The software</h4>
<p>
iCalcreator is a <em>PHP</em> class package managing iCal files, supporting (non-)calendar
systems and applications to process and communicate calendar information like
events, agendas, tasks, reports, totos and journaling information.
</p>
<p>
For iCalcreator 2.26.8 version (and later), <em>PHP</em> version 5.6+ is required.
</p>
<h4>iCal</h4>
<p>
A short iCal description is found at
<a href="http://en.wikipedia.org/wiki/ICalendar#Core_object" title="iCalendar From Wikipedia, the free encyclopedia" target="_blank">Wikipedia</a>.
If You are not familiar with iCal, read this first!
</p>
<p>
The <strong>iCalendar</strong> format, <strong>iCal</strong>, are described in
</p>
<dl>
<dt><a href="https://tools.ietf.org/html/rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a>
<dd>&quot;Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)&quot;
<dt><a href="https://tools.ietf.org/html/rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
<dd>&quot;iCalendar Transport-Independent Interoperability Protocol (iTIP)&quot;<br>Scheduling Events, BusyTime, To-dos and Journal Entries
<p class="quotes">. ..allows for the capture and exchange of information normally stored
within a calendaring and scheduling application.</p>
and
<p class="quotes">. ..is an exchange format between applications or systems.</p>
</dl>
<p>
<a href="https://tools.ietf.org/html/rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a> and
<a href="https://tools.ietf.org/html/rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
obsoletes, respectively,
<a href="https://tools.ietf.org/html/rfc2445" title="Download RFC2445 in text format" target="_blank">rfc2445</a> and
<a href="https://tools.ietf.org/html/rfc2446" title="Download RFC2446 in text format" target="_blank">rfc2446</a>.
</p>
<p>
Any references to rfc2445, below, corresponds to rfc5545.
</p>
<h4>xCal</h4>
<p>
iCalcreator also supports xCal (iCal xml),
<a href="https://tools.ietf.org/html/rfc6321" title="Download RFC6321 in text format" target="_blank">rfc6321</a>,
The XML Format for <strong>iCalendar</strong>.
</p>
<p>
A short xCal description is found at <a href="http://en.wikipedia.org/wiki/XCal" title="xCal on Wikipedia, the free encyclopedia" target="_blank">Wikipedia</a>.
</p>
<h4>Support</h4>
<p>
For previous iCalcreator releases support upon (paid) request only.
</p>
<p>
Use the issues <a href="https://github.com/iCalcreator/iCalcreator/issues" title="kigkonsult.se issues" target="_blank">page</a>
for queries, improvement/development issues or professional support and development.
Please note that paid support or consulting service has the highest priority.
</p>
<p>
kigkonsult offer professional services for software support, design and new/re-development, customizations and adaptations
of <em>PHP</em>/<em>MySQL</em> solutions with focus on software lifecycle management, including long term utility, reliability and maintainability.
</p>
<h4>Donate</h4>
<p>
You can show your appreciation for our free software,
and can support future development by making a donation to the kigkonsult GPL/LGPL projects.
</p>
<p>
Make a donation of any size by clicking <a href="http://kigkonsult.se/contact/index.php#Donate" title="Donate" target="_blank">here</a>.
Thanks in advance!
</p>
<h4>Contact</h4>
<p>
Use the <a href="https://github.com/iCalcreator/iCalcreator/issues" title="kigkonsult.se issues" target="_blank"> github issues</a>
for queries, improvement/development issues or professional support and development.
Please note that paid support or consulting service has the highest priority.
</p>
<h4>Downloads and usage examples</h4>
<p>
At <a href="https://github.com/iCalcreator/iCalcreator" title="kigkonsult iCalcreator" target="_blank">kigkonsult.se</a> you can download a more
complete manual and review and explore iCalcreator usage.
</p>
<h4>Install</h4>
<dl>
<dt>Composer (https://getcomposer.org/)
<dd>&nbsp;
<dd>composer require kigkonsult/icalcreator
<dd>&nbsp;
<dt>Or
<dd> include the (download) iCalcreator folder to your include-path
<dd>Add
<dd><span class="format">require_once &quot;[path/]iCalcreator-2.26.8/autoload.php&quot;;</span>
<dd>to your <em>PHP</em>-script.
<dd>The iCalcreator invoker has changed since previous version!
</dl>
<p>
iCalcreator 2.26.8 is using namespace &quot;Kigkonsult\Icalcreator&quot;.
</p>
<h4>Notes</h4>
<p>
When creating a new Vcalendar(/component) instance, review config settings.
</p>
<p>
You will find a complete iCalcreator function list (ex. getProperty, deleteProperty) in
<a href="https://github.com/iCalcreator/iCalcreator/docs" title="iCalcreator complete manual" target="_blank">iCalcreator manual</a>.
</p>
<p>
Note, to ease up usage, you will find convenient holders for component names,
properties, config keys etc in top of the &quot;util&quot; class file (src/util/util.php).
</p>
<h2>CREATE</h2>
<p class="example">&lt;?php
namespace Kigkonsult\Icalcreator;
use Kigkonsult\Icalcreator\Util\Util;
// <span class="comment">define time zone</span>
$tz = &quot;Europe/Stockholm&quot;;
// <span class="comment">set Your unique id, </span>
// <span class="comment">required if any component UID is missing</span>
$config = [
Util::$UNIQUE_ID =&gt; &quot;kigkonsult.se&quot;,
// <span class="comment">opt. set &quot;calendar&quot; timezone</span>
Util::$TZID =&gt; $tz
];
// <span class="comment">create a new Vcalendar instance</span>
$calendar= new Vcalendar( $config );
// <span class="comment">required of some calendar software</span>
$calendar-&gt;setProperty( Util::$METHOD, &quot;PUBLISH&quot; );
$calendar-&gt;setProperty( Util::$X_WR_CALNAME, &quot;Calendar Sample&quot;);
$calendar-&gt;setProperty( Util::$X_WR_CALDESC, &quot;Calendar Description&quot; );
$calendar-&gt;setProperty( Util::$X_WR_TIMEZONE, $tz );
// <span class="comment">create an calendar event component</span>
$vevent = $calendar-&gt;newVevent();
// <span class="comment">set event start</span>
$vevent-&gt;setProperty(
Util::$DTSTART,
new DateTime( '2017-04-01 19:00:00')
);
// <span class="comment">set event end</span>
$vevent-&gt;setProperty(
Util::$DTEND,
new DateTime( '2017-04-01 22:30:00')
);
$vevent-&gt;setProperty( Util::$LOCATION, &quot;Central Placa&quot; );
$vevent-&gt;setProperty( Util::$SUMMARY, &quot;PHP summit&quot; );
$vevent-&gt;setProperty( Util::$DESCRIPTION, &quot;This is a description&quot; );
$vevent-&gt;setProperty( Util::$COMMENT, &quot;This is a comment&quot; );
$vevent-&gt;setProperty( Util::$ATTENDEE, &quot;attendee1@icaldomain.net&quot; );
// <span class="comment">create an event alarm</span>
$valarm = $vevent-&gt;newValarm();
$valarm-&gt;setProperty( Util::$ACTION, &quot;DISPLAY&quot; );
// <span class="comment">reuse the event description</span>
$valarm-&gt;setProperty( Util::$DESCRIPTION, $vevent-&gt;getProperty( Util::$DESCRIPTION ));
// <span class="comment">create alarm trigger (in UTC datetime)</span>
$valarm-&gt;setProperty(
Util::$TRIGGER,
new DateTime( '2017-04-01 08:00:00 UTC')
);
// <span class="comment">create another calendar event component</span>
$vevent = $calendar-&gt;newVevent();
// <span class="comment">alt. date format, here for an all-day event</span>
$vevent-&gt;setProperty(
Util::$DTSTART,
&quot;20170401&quot;,
[ &quot;VALUE&quot; =&gt; &quot;DATE&quot; ]
);
$vevent-&gt;setProperty( Util::$ORGANIZER, &quot;cio@icaldomain.com&quot; );
$vevent-&gt;setProperty( Util::$SUMMARY, &quot;ALL-DAY event&quot; );
$vevent-&gt;setProperty( Util::$DESCRIPTION, &quot;This is a description for an all-day event&quot; );
$vevent-&gt;setProperty( Util::$RESOURCES, &quot;Full attension&quot; );
// <span class="comment">weekly, four occasions</span>
$vevent-&gt;setProperty(
Util::$RRULE,
[
&quot;FREQ&quot; =&gt; &quot;WEEKLY&quot;,
&quot;count&quot; =&gt; 4
]
);
// <span class="comment">supporting parse of strict rfc5545 formatted text</span>
$vevent-&gt;parse( &quot;LOCATION:1CP Conference Room 4350&quot; );
// <span class="comment">all calendar components are described in <a href="https://tools.ietf.org/html/rfc5545" title="RFC5545" target="_blank">rfc5545</a></span>
// <span class="comment">a complete iCalcreator function list (ex. setProperty) in the iCalcreator using manual</span>
// <span class="comment">create timezone component(-s)</span>
// <span class="comment">based on all start dates in events (i.e. all dtstarts)</span>
// <span class="comment">X-LIC-LOCATION required of some calendar software</span>
$xprops = [ Util::$X_LIC_LOCATION => $tz ];
Kigkonsult\Icalcreator\TimezoneHandler::createTimezone( $v, $tz, $xprops );
</p>
<h2>PARSE</h2>
<h4>iCal, rfc5545 / rfc2445 </h4>
<p>How to parse an iCal (external/file) resource</p>
<p class="example">
// <span class="comment">set Your unique id, </span>
// <span class="comment">required if any component UID is missing</span>
$vcalendar = new Vcalendar(
[ Util::$UNIQUE_ID =&gt; &quot;kigkonsult.se&quot;, ]
);
$iCalContent = file_get_contents( &quot;calendar.ics&quot; );
$vcalendar-&gt;parse( $iCalContent );
<h4>xCal, rfc6321 (XML)</h4>
<p>
How to convert (file) XML resource to an Vcalendar instance.
</p>
<p class="example">
// <span class="comment">set Your unique id, </span>
// <span class="comment">required if any component UID is missing</span>
$config = [ Util::$UNIQUE_ID =&gt; &quot;kigkonsult.se&quot; ];
// <span class="comment">use a local xCal file</span>
$filename = &quot;xmlfile.xml&quot;;
// <span class="comment"> or a remote xCal resource</span>
/* $filename = 'http://kigkonsult.se/xcal.php?a=1&amp;b=2&amp;c=3'; */
if( ! ( $calendar = Kigkonsult\Icalcreator\IcalXML::XMLfile2iCal( $filename, $config ))) {
exit( &quot;Error when parsing $filename&quot; );
}
// <span class="comment">continue process (edit, parse, select) $calendar</span>
</p>
<h2>EDIT</h2>
<p class="example">
// <span class="comment">create a new Vcalendar instance</span>
$config = [ Util::$UNIQUE_ID =&gt; &quot;kigkonsult.se&quot; ];
$calendar = new Vcalendar( $config );
// <span class="comment">parse a calendar file</span>
$config = [
Util::$DIRECTORY =&gt; &quot;calendars&quot;,
Util::$FILENAME =&gt; &quot;file.ics&quot;
];
$calendar-&gt;setConfig( $config );
$calendar-&gt;parse();
// <span class="comment">required of some calendar software</span>
$calendar-&gt;setProperty( Util::$METHOD, &quot;PUBLISH&quot; );
$calendar-&gt;setProperty( Util::$X_WR_CALNAME, &quot;Calendar Sample&quot;);
$calendar-&gt;setProperty( Util::$X_WR_CALDESC, &quot;Calendar Description&quot; );
$calendar-&gt;setProperty( Util::$X_WR_TIMEZONE, &quot;Europe/Stockholm&quot; );
// <span class="comment">read events, one by one</span>
while( $vevent = $calendar-&gt;getComponent(
Vcalendar::VEVENT )) {
// <span class="comment">get uid (unique id/key for component), required, one occurrence </span>
$uid = $vevent-&gt;getProperty( Util::$UID );
// <span class="comment">get dtstart required, one occurrence</span>
$dtstart = $vevent-&gt;getProperty( Util::$DTSTART );
// <span class="comment">opt. description</span>
if( $description = $vevent-&gt;getProperty( Util::$DESCRIPTION, 1 )) {
// <span class="comment">edit the description</span>
// <span class="comment">update/replace the description</span>
$vevent-&gt;setProperty(
Util::$DESCRIPTION,
$description,
false,
1
);
}
// <span class="comment">get optional comments</span>
while( $comment = $vevent-&gt;getProperty( Util::$COMMENT )) {
.. .
}
// <span class="comment">remove all ATTENDEE properties .. .</span>
while( $vevent-&gt;deleteProperty( Util::$ATTENDEE )) {
continue;
}
// <span class="comment">update/replace event in calendar</span>
// <span class="comment"> with UID as key</span>
$calendar-&gt;setComponent ( $vevent, $uid );
} // end while
</p>
<br>
<br>
<h2>SELECT</h2>
<p>
(setup)
</p>
<p class="example">
// <span class="comment">create a new Vcalendar instance</span>
$calendar = new Vcalendar(
[ Util::$UNIQUE_ID =&gt; &quot;kigkonsult.se&quot;, ]
);
$iCalContent = file_get_contents( &quot;http://www.aDomain.net/file.ics&quot; );
$calendar-&gt;parse( $iCalContent );
// <span class="comment">required of some calendar software</span>
$calendar-&gt;setProperty( Util::$METHOD, &quot;PUBLISH&quot; );
$calendar-&gt;setProperty( Util::$X_WR_CALNAME, &quot;Calendar Sample&quot;);
$calendar-&gt;setProperty( Util::$X_WR_CALDESC, &quot;Calendar Description&quot; );
$calendar-&gt;setProperty( Util::$X_WR_TIMEZONE, &quot;Europe/Stockholm&quot;);
</p>
<h4>Ex. calendar date based select</h4>
<p class="example">
// <span class="comment">select components occurring today</span>
// <span class="comment">(including components with recurrence pattern)</span>
$eventArray = $calendar-&gt;selectComponents();
foreach( $eventArray as $year =&gt; $yearArray) {
foreach( $yearArray as $month =&gt; $monthArray ) {
foreach( $monthArray as $day =&gt; $dailyEventsArray ) {
foreach( $dailyEventsArray as $vevent ) {
// <span class="comment">if event is a member of a recurrence set</span>
// <span class="comment">returns [ </span>
// <span class="comment"> &quot;x-current-dtstart&quot;,</span>
// <span class="comment"> (string) date( &quot;Y-m-d [H:i:s][timezone/UTC offset]&quot;)</span>
// <span class="comment">]</span>
$currddate = $event-&gt;getProperty( Util::$X_CURRENT_DTSTART );
// <span class="comment">orig. dtstart</span>
$dtstart = $vevent-&gt;getProperty( Util::$DTSTART );
$summary = $vevent-&gt;getProperty( Util::$SUMMARY );
$description = $vevent-&gt;getProperty( Util::$DESCRIPTION );
.. .
.. .
} // end foreach
} // end foreach
} // end foreach
} // end foreach
</p>
<h4>Ex. calendar select specific property values</h4>
<p class="example">
// <span class="comment">fetch specific property from calendar perspective</span>
// <span class="comment">(unique) values and occurrences : </span>
// <span class="comment">ATTENDEE, CATEGORIES, CONTACT,</span>
// <span class="comment">DTSTART, LOCATION, ORGANIZER,</span>
// <span class="comment">PRIORITY, RESOURCES, STATUS,</span>
// <span class="comment">SUMMARY, UID, URL,</span>
// <span class="comment">GEOLOCATION<sup>*</sup></span>
$valueOccur = $calendar-&gt;getProperty( Util::$RESOURCES );
foreach( $valueOccur as $uniqueValue =&gt; $occurCnt ) {
echo &quot;The RESOURCES value &lt;b&gt;$uniqueValue&lt;/b&gt; occurs &lt;b&gt;$occurCnt&lt;/b&gt; times&lt;br /&gt;&quot;;
}
</p>
<p>
<sup>*</sup>) Using the non-standard directive "GEOLOCATION", iCalcreator returns output supporting
ISO6709 "Standard representation of geographic point location by coordinates",
by combining the "LOCATION" and "GEO" property values (only if "GEO" is set).
</p>
<h4>Ex. select calendar components based on specific property value</h4>
<p class="example">
// <span class="comment">selects components</span>
// <span class="comment">based on specific property value(-s)</span>
// <span class="comment">ATTENDEE, CATEGORIES, CONTACT,</span>
// <span class="comment">LOCATION, ORGANIZER,</span>
// <span class="comment">PRIORITY, RESOURCES, STATUS,</span>
// <span class="comment">SUMMARY, URL, UID</span>
$selectSpec = [ Util::$CATEGORIES =&gt; &quot;course1&quot; ];
$specComps = $calendar-&gt;selectComponents( $selectSpec );
foreach( $specComps as $comp ) {
.. .
}
</p>
<br>
<br>
<h2>OUTPUT</h2>
<p>(setup)</p>
<p class="example">
// <span class="comment">create a new Vcalendar instance</span>
$calendar = new Vcalendar(
[ Util::$UNIQUE_ID =&gt; &quot;kigkonsult.se&quot;, ]
);
// <span class="comment">required of some calendar software</span>
$calendar-&gt;setProperty( Util::$METHOD, &quot;PUBLISH&quot; );
$calendar-&gt;setProperty( Util::$X_WR_CALNAME, &quot;Calendar Sample&quot;);
$calendar-&gt;setProperty( Util::$X_WR_CALDESC, &quot;Calendar Description&quot; );
$calendar-&gt;setProperty( Util::$X_WR_TIMEZONE, &quot;Europe/Stockholm&quot;);
// <span class="comment">continue process (edit, parse, select) $calendar</span>
</p>
<h5>opt 1</h5>
<p>
Redirect calendar file to browser.
</p>
<p class="example">
$calendar-&gt;returnCalendar();
exit;
</p>
<h5>opt 2</h5>
<p>
Save calendar to file.
</p>
<p class="example">
// <span class="comment">set output directory and file name</span>
$config = [
Util::$DIRECTORY =&gt; &quot;depot&quot;,
Util::$FILENAME =&gt; &quot;calendar.ics&quot;
];
$calendar-&gt;setConfig( $config );
$calendar-&gt;saveCalendar();
</p>
<h5>opt 3, xCal</h5>
<p>
Create well-formed XML, rfc6321 (as string).
</p>
<p class="example">
$xmlstr = Kigkonsult\Icalcreator\IcalXML::iCal2XML( $calendar);
</p>
<h5>opt 4, json</h5>
<p>
Create a json string.
</p>
<p class="example">
$xmlstr = Kigkonsult\Icalcreator\IcalXML::iCal2XML( $calendar);
$json = json_encode( simplexml_load_string( $xmlstr ));
</p>
<br>
<br>
<a name="Copyright_and_Licence"></a>
<h2>COPYRIGHT AND LICENSE</h2>
<table>
<tr><td>Copyright<td>(c) 2007-2019 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
<tr><td>Link <td>http://kigkonsult.se/iCalcreator/index.php
<tr><td>Package <td>iCalcreator
<tr><td>Version <td>2.26.8
<tr><td class="top">License <td>
Subject matter of licence is the software iCalcreator.<br>
The above copyright, link, package and version notices,<br>
this licence notice and the invariant [rfc5545] PRODID result use<br>
as implemented and invoked in iCalcreator shall be included in<br>
all copies or substantial portions of the iCalcreator.<br>
<br>
iCalcreator is free software: you can redistribute it and/or modify<br>
it under the terms of the GNU Lesser General Public License as published<br>
by the Free Software Foundation, either version 3 of the License,<br>
or (at your option) any later version.<br>
<br>
iCalcreator is distributed in the hope that it will be useful,<br>
but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
GNU Lesser General Public License for more details.<br>
<br>
You should have received a copy of the GNU Lesser General Public License<br>
along with iCalcreator. If not, see &lt;https://www.gnu.org/licenses/&gt;.
</table>
<br>
</body>
</html>