Location: PHPKode > scripts > iCalcreator > iCalcreator-2.14/using.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>iCalcreator 2.14 manual</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="author"      content="Kjell-Inge Gustafsson - kigkonsult">
<meta name="copyright"   content="2007-2012 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.14">
<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;
}
a.ref {
  BACKGROUND-COLOR: inherit;
  xFONT-FAMILY     : Areal;
  FONT-SIZE       : 8pt;
  LETTER-SPACING  : 0.1em;
}
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%;
}
.bb {
  BORDER-BOTTOM   : gray dotted thin;
}
.blb {
  BORDER-LEFT     : gray dotted thin;
  BORDER-BOTTOM   : gray dotted thin;
  TEXT-ALIGN      : center;
}
.bl {
  BORDER-LEFT     : gray dotted thin;
}
.center {
  TEXT-ALIGN      : center;
}
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: transparent;
  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 {
  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;
  WIDTH           : 800px;
}
p.label {
  FONT-FAMILY     : Arial;
  FONT-WEIGHT     : bold;
  LETTER-SPACING  : 0.1em;
}
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;
}
.ref {
  BACKGROUND-COLOR: transparent;
  xFONT-FAMILY     : Areal;
  FONT-SIZE       : 8pt;
  LETTER-SPACING  : 0.1em;
}
.top {
  VERTICAL-ALIGN  : top;
}
</style>
</head>
<body>
<a name="top"></a>
<p class="header">iCalcreator v2.14</p>
<p>
iCalcreator v2.14<br>
copyright (c) 2007-2012 Kjell-Inge Gustafsson, kigkonsult<br>
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
</p>

<h2>Description:</h2>
<p>
iCalcreator is a <em>PHP</em> implementation of RFC2445/RFC2446 to manage iCal/xCal formatted files.
</p>

<a name="INTRO"></a><h1>1. INTRO</h1>
<p>
iCalcreator is a <em>PHP</em> class package managing iCal files, supporting (non-)<strong>calendar</strong>
systems and applications to process and communicate <strong>calendar</strong> information like
events, agendas, tasks, reports, totos and journaling information.
</p>
<p>
iCalcreator features create, parse, edit and select <strong>calendar</strong> and <strong>calendar</strong> components.
</p>
<p>
The iCalcreator package, built of a <strong>calendar</strong> class with support of a function class and helper functions,
are <strong>calendar</strong> component property oriented. Development environment is <em>PHP</em> version 5.x
but coding is done to meet 4.x backward compatibility and may work. Some functions requires <em>PHP</em> >= 5.2.0.
</p>
<p>
The iCalcreator main class, utility class and helper functions are all included in the &quot;iCalcreator.class.php&quot; file.
</p>
<p>
More iCalcreator supplementary and &quot;howto&quot; information will be found at
kigkonsult.se iCalcreator implement examples and test <a href="http://kigkonsult.se/test/index.php" title="kigkonsult.se iCalcreator implement howto" target="_blank">pages</a>.
A strong recommendation is to have this document open in parallell when exploiting the link.
</p>
<p>
iCalcreator will support hiphop if the HDF AllDynamic option is enabled (the helper iCal2XML and XMl2iCal functions are excluded).
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>

<a name="Standards"></a><h2>1.1 Standards</h2>

<h4>iCal</h4>
The <strong>iCalendar</strong> format, <strong>iCal</strong>, as described in
<dl>
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=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="http://kigkonsult.se/downloads/dl.php?f=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
</dl>
<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>
<p><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a> and
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
obsoletes, respectively,
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="Download RFC2445 in text format" target="_blank">rfc2445</a> and
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2446" title="Download RFC2446 in text format" target="_blank">rfc2446</a>.
</p>
<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!
Knowledge of <strong>calendar</strong> protocol rfc5545/rfc5546 is to recommend.
</p>
<p>
Any references to rfc2445, below, corresponds to rfc5545.
</p>

<h4>xCal</h4>
<p>iCalcreator also supports xCal (iCal xml) rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;, to be downloaded from</p>
<dl>
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc6321" title="Download RFC6321 in text format" target="_blank">rfc6321</a>
<dd>&quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;
</dl>
<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>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>


<a name="This_manual"></a><h2>1.2 This manual</h2>
<p>This style is used for text.</p>
<p class="format">This style is used for formats.</p>
<p class="example">&lt;?php
.. .
This style is used for <em>PHP</em> coding examples.
<span class="comment"> // this style is used for coding comments.</span>
.. .
</p>
<p class="comment">This style is used for content details.</p>
<p class="quotes">This style is used for RFC2445/5545 quotes.</p>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>


<a name="Versioning"></a><h2>1.3 Versioning</h2>

<p>The release numbering convention used is major.minor(.micro&nbsp;/&nbsp;suffix).</p>
<dl>
<dt>Major
<dd>Indicates a very large change in the core package. Rewrites or major milestones.
<dt>Minor
<dd>Significant amount of feature addition/modification.<br>odd number - development/experimental release<br> even number - production release
<dt>Micro
<dd>Primarily bug fix and maintenance number.
<dt>Suffix
<dd>rc1 for first release candidate etc.
</dl>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>

<a name="Support"></a><h2>1.4 Support</h2>
<p>
The main support channel is using iCalcreator
<a title="Sourceforge" href="http://sourceforge.net/projects/icalcreator/forums/" target="_blank">Sourceforge</a> forum.
</p>
<p>
Use the contact <a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se/contact" 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 services for software support, design and development of customizations and adaptations
of <em>PHP</em>/<em>MySQL</em> solutions
with a special focus on software long term utility and reliability,
supported through our agile acquire/design/transition process model.
</p>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>


<a name="Donate"></a><h2>1.5 Donate</h2>
<p>
You can show your appreciation for our free software,
and can support future development by making a donation to the kigkonsult project iCalcreator.
</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>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>

<a name="INSTALL"></a><h2>1.6 Install</h2>

<a name="Basic"></a><h3>1.6.1 Basic</h3>
<p>
Unpack to any folder<br>
- add this folder to your include-path<br>
- or unpack to your application-(include)-folder
</p>
<p>Add</p>
<p class="format">require_once &quot;[folder/]iCalcreator.class.php&quot;;</p>
<p>to your <em>PHP</em>-script.</p>
<p>
If using <em>PHP</em> version 5.1 or higher, the default timezone may need to be set.
</p>
<p>
Creating a new iCalcreator object instance/component instance, review <a href="#iCalcreator_configuration_methods">config</a> settings.
</p>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>


<a name="Boost"></a><h3>1.6.2 Boost performance</h3>
<p>
To really boost performance, kigkonsult can now offer <em>PHP</em> (4 and 5) packages (iCalcreator etc) in byte coded files,
using <a href="http://www.ioncube.com" target="_blank"><u>ionCube</u></a> encoder.
</p>
<p>
Encoded files use a platform independent file format, and can be run on any platform for which ionCube supply a (free) Loader.
Currently supported platforms are Windows (e.g. NT, XP, W2K), Intel Linux, FreeBSD, NetBSD, OpenBSD, OS X, and Sparc Solaris.
</p>
<p>
Visit kigkonsult.se contact <a href="http://kigkonsult.se/contact/index.php" target="_blank"><u>page</u></a> for information and purchase.
</p>
<p>
Use basic install (above), install ionCube Loader (requires an update of &quot;php.ini&quot;
or additional file in &quot;/etc/php.d&quot; folder AND the execute rights to use the <em>PHP</em> &quot;dl&quot; function)
and simply replace the <em>PHP</em> class files with the encoded files.
</p>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>


<a name="Additional_Descriptors"></a><h2>1.7 Additional Descriptors</h2>
<p>The following properties (as described in <a href="http://en.wikipedia.org/wiki/ICalendar#Calendar_extensions" title="http://en.wikipedia.org/wiki/ICalendar#Calendar_extensions" target="_blank">wikipedia:iCal</a>)
may be required when importing iCal files into some calendaring software (MS etc.):</p>
<dl>
<dt>on <strong>calendar</strong> level
<dd><a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
<dd><a href="#X-PROPERTY">X-WR-CALNAME</a> x-property
<dd><a href="#X-PROPERTY">X-WR-CALDESC</a> x-property
<dd><a href="#X-PROPERTY">X-WR-RELCALID</a> x-property <span class="comment">(a <a href="/wiki/Universally_Unique_Identifier" title="Universally Unique Identifier" class="mw-redirect">UUID</a>.)</span>
<dd><a href="#X-PROPERTY">X-WR-TIMEZONE</a> x-property
<dt>on component level
<dd><a href="#DTSTAMP">DTSTAMP</a> property (in iCalcreator created automatically, if not set)
<dd><a href="#UID">UID</a> property (in iCalcreator created automatically, if not set)
<dt>on component level in a <a href="#VTIMEZONE">vtimezone</a> component
<dd><a href="#X-PROPERTY">X-LIC-LOCATION</a> x-property
</dl>
<p class="label">Example</p>
<p>Recommendation is also to set <a href="#Unique_id">unique_id</a>, creating a new vcalendar/component instance,
to ensure accurate setting of all components <a href="#UID">UID</a> property, especially before <a href="#parse_merge">parse</a>.</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;setProperty( &quot;method&quot;,        &quot;PUBLISH&quot; )
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;,  &quot;Calendar Sample&quot; );
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;,  &quot;Calendar Description&quot; );
$uuid      = &quot;3E26604A-50F4-4449-8B3E-E4F4932D05B5&quot;;
$vcalendar-&gt;setProperty( &quot;X-WR-RELCALID&quot;, $uuid );
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
.. .
</p>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>


<a name="Addendum"></a><h2>1.8 Addendum</h2>
<p>
For iCalcreator usage, coding samples and tests, visit the public kigkonsult.se
<a title="iCalcreator coding and test pages" href="http://kigkonsult.se/test/index.php" target="_blank">test</a> resource.
</p>
<dl>
<dt>Examples how to employ iCalcreator in software development
<dd><a title="dbiCal" href="http://kigkonsult.se/dbiCal/index.php" target="_blank">dbiCal</a>, an iCal file <i>PHP</i> database backend solution.
<dd><a title="Create iCal event file on-demand from form" href="http://kigkonsult.se/eventCreator/index.php" target="_blank">The iCal file event editor</a>
<dd><a title="tinycal" href="http://kigkonsult.se/tinycal/index.php" target="_blank">tinycal</a>, <strong>calendar</strong>-in-a-box.
</dl>
<p>
There are free iCal/xCal icons (use as buttons on a web page?) to download
<a href="http://kigkonsult.se/downloads/i.php?i=all" title="iCal images" target="_blank">here</a>.
</p>
<p>
The <em>PHP</em> coding in this document or &quot;coding samples&quot; (above) are only for display of usage, recommendation is to use a
coding standard, the following, incomplete, list is a good start;
</p>
<dl>
<dd><a href="http://www.dagbladet.no/development/phpcodingstandard/" target="_blank">http://www.dagbladet.no/development/phpcodingstandard/</a>
<!-- <a href="http://ez.no/ezpublish/documentation/development/standards/php" target="_blank">http://ez.no/ezpublish/documentation/development/standards/php</a> -->
<dd><a href="http://framework.zend.com/manual/en/coding-standard.overview.html" target="_blank">http://framework.zend.com/manual/en/coding-standard.overview.html</a>
<!-- <a href="http://gforge.org/docman/view.php/1/2/coding-standards.html" target="_blank">http://gforge.org/docman/view.php/1/2/coding-standards.html</a> -->
<dd><a href="http://pear.php.net/manual/en/standards.php" target="_blank">http://pear.php.net/manual/en/standards.php</a>
</dl>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>


<a name="INDEX"></a><h2>1.9 INDEX</h2>

<a href="#INTRO">1. INTRO</a><br>
<br>
<a href="#Standards">1.1 Standards</a><br>
<a href="#This_manual">1.2 This manual</a><br>
<a href="#Versioning">1.3 Versioning</a><br>
<a href="#Support">1.4 Support</a><br>
<a href="#Donate">1.5 Donate</a><br>
<a href="#INSTALL">1.6 Install</a><br>
<a href="#Basic">1.6.1 Basic</a><br>
<a href="#Boost">1.6.2 Boost performance</a><br>
<a href="#Additional_Descriptors">1.7 Additional_Descriptors</a><br>
<a href="#Addendum">1.8 Addendum</a><br>
<a href="#INDEX">1.9 INDEX</a><br>
<br>
<a href="#Calendar_Component_list">2. Calendar Component list</a><br>
<br>
<a href="#VCALENDAR">2.1  VCALENDAR</a><br>
<a href="#VEVENT">2.2  VEVENT</a><br>
<a href="#VTODO">2.3  VTODO</a><br>
<a href="#VJOURNAL">2.4  VJOURNAL</a><br>
<a href="#VFREEBUSY">2.5  VFREEBUSY</a><br>
<a href="#VALARM">2.6  VALARM</a><br>
<a href="#VTIMEZONE">2.7  VTIMEZONE</a><br>
<a href="#CalProps">2.8  Component Properties</a><br>
<br>
<a href="#Function_list">3. Function list</a><br>
<br>
<a href="#iCalcreator_object_methods">3.1 iCalcreator object methods</a><br>
<br>
<a href="#Calendar_object_constructors">3.1.1 Constructors</a><br>
<a href="#vcalendar_constr">3.1.1.1 vcalendar</a><br>
<a href="#vevent_constr">3.1.1.2 vevent</a><br>
<a href="#vtodo_constr">3.1.1.3 vtodo</a><br>
<a href="#vjournal_constr">3.1.1.4 vjournal</a><br>
<a href="#vfreebusy_constr">3.1.1.5 vfreebusy</a><br>
<a href="#valarm_constr">3.1.1.6 valarm</a><br>
<a href="#vtimezone_constr">3.1.1.7 vtimezone</a><br>
<a href="#standard_constr">3.1.1.8 standard</a><br>
<a href="#daylight_constr">3.1.1.9 daylight</a><br>
<br>
<a href="#iCalcreator_object_property_methods">3.1.2 iCalcreator object property methods</a><br>
<a href="#deleteProperty">3.1.2.1 deleteProperty</a><br>
<a href="#getProperty">3.1.2.2 getProperty</a><br>
<a href="#setProperty">3.1.2.3 setProperty</a><br>
<a href="#CALSCALE">3.1.2.4 CALSCALE</a><br>
<a href="#METHOD">3.1.2.5 METHOD</a><br>
<a href="#VERSION">3.1.2.6 VERSION</a><br>
<a href="#X-PROPERTY">3.1.2.7 X-PROPERTY</a><br>
<br>
<a href="#iCalcreator_component_object_methods">3.1.3 iCalcreator component object methods</a><br>
<a href="#deleteComponent">3.1.3.1 deleteComponent</a><br>
<a href="#getComponent">3.1.3.2 getComponent</a><br>
<a href="#newComponent">3.1.3.3 newComponent</a><br>
<a href="#selectComponents">3.1.3.4 selectComponents</a><br>
<a href="#setComponent">3.1.3.5 setComponent</a><br>
<br>
<a href="#iCalcreator_inputoutput_methods">3.1.4 iCalcreator input/output methods</a><br>
<a href="#parse_merge">3.1.4.1 parse and merge</a><br>
<a href="#createCalendar">3.1.4.2 createCalendar</a><br>
<a href="#returnCalendar">3.1.4.3 returnCalendar</a><br>
<a href="#saveCalendar">3.1.4.4 saveCalendar</a><br>
<a href="#sort">3.1.4.5 sort</a><br>
<a href="#useCachedCalendar">3.1.4.6 useCachedCalendar</a><br>
<br>
<a href="#iCalcreator_configuration_methods">3.1.5 iCalcreator configuration methods</a><br>
<a href="#configKeys">3.1.5.1 configuration keys</a><br>
<a href="#getConfig">3.1.5.2 getConfig</a><br>
<a href="#initConfig">3.1.5.3 calendar/component initialization</a><br>
<a href="#setConfig">3.1.5.4 setConfig</a><br>
<a href="#allowEmpty">3.1.5.5 Allow empty components</a><br>
<a href="#Compsinfo">3.1.5.6 Component information</a><br>
<a href="#Delimiter">3.1.5.7 Delimiter</a><br>
<a href="#Directory">3.1.5.8 Directory</a><br>
<a href="#Fileinfo">3.1.5.9 Fileinfo</a><br>
<a href="#Filename">3.1.5.10 Filename</a><br>
<a href="#Filesize">3.1.5.11 Filesize</a><br>
<a href="#Format">3.1.5.12 Format</a><br>
<a href="#Language">3.1.5.13 Language</a><br>
<a href="#NewlineChar">3.1.5.14 NewlineChar</a><br>
<a href="#dTZID">3.1.5.15 TZID</a><br>
<a href="#Unique_id">3.1.5.16 Unique_id</a><br>
<a href="#configURL">3.1.5.17 URL</a><br>
<br>
<a href="#Calendar_component_object_property_function_list">3.2 Calendar component property method list</a><br>
<br>
<a href="#deleteProperty_PROP">3.2.1 deleteProperty</a><br>
<a href="#getProperty_PROP">3.2.2 getProperty</a><br>
<a href="#parse">3.2.3 parse</a><br>
<a href="#setProperty_PROP">3.2.4 setProperty</a><br>
<dl>
<dt>Ascending property order
<dd><a href="#ACTION">3.2.5 ACTION</a>
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
<dd><a href="#CLASS">3.2.9 CLASS</a>
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
<dd><a href="#CREATED">3.2.13 CREATED</a>
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
<dd><a href="#DTEND">3.2.15 DTEND</a>
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
<dd><a href="#DUE">3.2.18 DUE</a>
<dd><a href="#DURATION">3.2.19 DURATION</a>
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
<dd><a href="#EXRULE">3.2.21 EXRULE</a>
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
<dd><a href="#GEO">3.2.23 GEO</a>
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
<dd><a href="#RDATE">3.2.29 RDATE</a>
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
<dd><a href="#RRULE">3.2.35 RRULE</a>
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
<dd><a href="#STATUS">3.2.37 STATUS</a>
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
<dd><a href="#TZID">3.2.41 TZID</a>
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
<dd><a href="#TZURL">3.2.45 TZURL</a>
<dd><a href="#UID">3.2.46 UID</a>
<dd><a href="#URL">3.2.47 URL</a>
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
<dt>Descriptive Component Properties
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
<dd><a href="#GEO">3.2.23 GEO</a>
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
<dd><a href="#STATUS">3.2.37 STATUS</a>
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
<dt>Date and Time Component Properties
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
<dd><a href="#DTEND">3.2.15 DTEND</a>
<dd><a href="#DUE">3.2.18 DUE</a>
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
<dd><a href="#DURATION">3.2.19 DURATION</a>
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
<dt>Time Zone Component Properties
<dd><a href="#TZID">3.2.41 TZID</a>
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
<dd><a href="#TZURL">3.2.45 TZURL</a>
<dt>Relationship Component Properties
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
<dd><a href="#URL">3.2.47 URL</a>
<dd><a href="#UID">3.2.46 UID</a>
<dt>Recurrence Component Properties
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
<dd><a href="#RDATE">3.2.29 RDATE</a>
<dd><a href="#RRULE">3.2.35 RRULE</a>
<dt>Alarm Component Properties
<dd><a href="#ACTION">3.2.5 ACTION</a>
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
<dt>Change Management Component Properties
<dd><a href="#CREATED">3.2.13 CREATED</a>
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
<dt>Miscellaneous Component Properties
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
</dl>
<a href="#iCalcreator_component_configuration_methods">3.3 iCalcreator Component configuration methods</a><br>
<br>
<a href="#Language_PROP">3.3.1 Language</a><br>
<br>
<a href="#iCalcreator_component_object_misc_methods">3.4 iCalcreator component object misc. methods</a><br>
<br>
<a href="#deleteComponent_PROP">3.4.1 deleteComponent</a><br>
<a href="#getComponent_PROP">3.4.2 getComponent</a><br>
<a href="#newComponent_PROP">3.4.3 newComponent</a><br>
<a href="#setComponent_PROP">3.4.4 setComponent</a><br>
<br>
<a href="#iCalUtilityFunctions">4. iCalUtilityFunctions</a><br>
<br>
<a href="#createTimezone">4.1 createTimezone</a><br>
<a href="#ms2phpTZ">4.2 ms2phpTZ</a><br>
<a href="#transformDateTime">4.3 transformDateTime</a><br>
<br>
<a href="#helperFunctions">5. Helper functions</a><br>
<br>
<a href="#iCal2XML">5.1 iCal2XML</a><br>
<a href="#XML2iCal">5.2 XML2iCal</a><br>
<br>
<a href="#TZhelpers">5.3 time zone helper functions</a><br>
<a href="#getTzOffsetForDate">5.3.1 getTzOffsetForDate</a><br>
<a href="#getTimezonesAsDateArrays">5.3.2 getTimezonesAsDateArrays</a><br>
<br>
<a href="#vCardhelpers">5.4 vCard helper functions</a><br>
<br>
<a href="#iCal2vCard">5.4.1 iCal2vCard</a><br>
<a href="#iCal2vCards">5.4.2 iCal2vCards</a><br>
<br>
<a href="#Copyright_and_Licence">5. COPYRIGHT AND LICENSE</a><br>
<a href="#Copyright">6.1 Copyright</a><br>
<a href="#Licence">6.2 License</a><br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>

<a name="Calendar_Component_list"></a><h1>2. Calendar Component list</h1>
<p>
Quote from <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)!
(Described in iCal output format, content corresponds to xCal format.)
</p>
<a name="VCALENDAR"></a><h2>2.1  VCALENDAR</h2>
<p class="center">icalobject = 1*(&quot;BEGIN&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF</p>
<p class="center">icalbody</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF)</p>
<p>icalbody = calprops component</p>
<p>calprops = 2*(</p>
<p class="center">&quot;prodid&quot; and &quot;version&quot; are both REQUIRED, but MUST NOT occur more than once
<p class="center">prodid / <a href="#VERSION">version</a> /</p>
<p class="center">&quot;calscale&quot;and &quot;method&quot;are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CALSCALE">calscale</a> / <a href="#METHOD">method</a> /</p>
<p class="center"><a href="#X-PROPERTY">x-prop</a></p>
<p>)</p>
<p class="center">component  = 1*(<a href="#VEVENT">eventc</a> / <a href="#VTODO">todoc</a> / <a href="#VJOURNAL">journalc</a> / <a href="#VFREEBUSY">freebusyc</a> / <a href="#VTIMEZONE">timezonec</a> / iana-comp* / x-comp*)</p>
<p class="center">iana-comp  = &quot;BEGIN&quot; &quot;:&quot; iana-token CRLF</p>
<p class="center">1*contentline</p>
<p class="center">&quot;END&quot; &quot;:&quot; iana-token CRLF</p>
<p class="center">x-comp     = &quot;BEGIN&quot; &quot;:&quot; x-name CRLF</p>
<p class="center">1*contentline</p>
<p class="center">&quot;END&quot; &quot;:&quot; x-name CRLF</p>
<p>*) <span class="comment">not supported by iCalcreator</span></p>

<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="VEVENT"></a><h2>2.2  VEVENT</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
<p class="center">eventprop *alarmc</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
<p>eventprop = *(</p>
<p class="center">the following are optional,but MUST NOT occur more than once</p>
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> /</p>
<p class="center"><a href="#GEO">geo</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#LOCATION">location</a> / <a href="#ORGANIZER">organizer</a> / <a href="#PRIORITY">priority</a> / </p>
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> / </p>
<p class="center"><a href="#TRANSP">transp</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / <a href="#RECURRENCE-ID">recurid</a> /</p>
<p class="center">either &quot;<a href="#DTEND">dtend</a>&quot; or &quot;<a href="#DURATION">duration</a>&quot; may appear in a &quot;eventprop&quot;, </p>
<p class="center">but &quot;<a href="#DTEND">dtend</a>&quot; and &quot;<a href="#DURATION">duration</a>&quot; MUST NOT occur in the same &quot;eventprop&quot;</p>
<p class="center"><a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> /</p>
<p class="center">the following are optional, and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / </p>
<p class="center"><a href="#RELATED-TO">related</a> / <a href="#RESOURCES">resources</a> / <a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="VTODO"></a><h2>2.3  VTODO</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
<p class="center">todoprop *alarmc</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
<p>todoprop   = *(</p>
<p class="center">the following are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CLASS">class</a> / <a href="#COMPLETED">completed</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTAMP">dtstamp</a> / <a href="#DTSTART">dtstart</a> / </p>
<p class="center"><a href="#GEO">geo</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#LOCATION">location</a> / <a href="#ORGANIZER">organizer</a> / <a href="#PERCENT-COMPLETE">percent</a> / <a href="#PRIORITY">priority</a> / </p>
<p class="center"><a href="#RECURRENCE-ID">recurid</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> /<a href="#UID">uid</a> / <a href="#URL">url</a> /</p>
<p class="center">either &quot;<a href="#DUE">due</a>&quot; or &quot;<a href="#DURATION">duration</a>&quot; may appear in a &quot;todoprop&quot;,</p>
<p class="center"> but &quot;<a href="#DUE">due</a>&quot; and &quot;<a href="#DURATION">duration</a>&quot; MUST NOT occur in the same &quot;todoprop&quot;</p>
<p class="center"><a href="#DUE">due</a> / <a href="#DURATION">duration</a> /</p>
<p class="center">the following are optional,and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / </p>
<p class="center"><a href="#RELATED-TO">related</a> / <a href="#RESOURCES">resources</a> / <a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="VJOURNAL"></a><h2>2.4  VJOURNAL</h2>
<p class="center">journalc   = &quot;BEGIN&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
<p class="center">jourprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
<p>jourprop   = *(</p>
<p class="center">the following are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> / </p>
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#ORGANIZER">organizer</a> / <a href="#RECURRENCE-ID">recurid</a> / </p>
<p class="center"><a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> /<a href="#UID">uid</a> / <a href="#URL">url</a> /</p>
<p class="center">the following are optional,and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> /</p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#RELATED-TO">related</a> / </p>
<p class="center"><a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="VFREEBUSY"></a><h2>2.5  VFREEBUSY</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
<p class="center">fbprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
<p>fbprop     = *(</p>
<p class="center">the following are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#DTSTART">dtstart</a> / <a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> / </p>
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#ORGANIZER">organizer</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / </p>
<p class="center">the following are optional,and MAY occur more than once</p>
<p class="center"><a href="#ATTENDEE">attendee</a> / <a href="#COMMENT">comment</a> / <a href="#FREEBUSY_PROP">freebusy</a> / <a href="#REQUEST-STATUS">rstatus</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="VALARM"></a><h2>2.6  VALARM</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p>
<p class="center">(audioprop / dispprop / emailprop / procprop)</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p>
<p>audioprop  = 2*(</p>
<p class="center">&quot;<a href="#ACTION">action</a>&quot; and &quot;<a href="#TRIGGER">trigger</a>&quot; are both REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#TRIGGER">trigger</a> /</p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional,and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
<p class="center">the following is optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / </p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<p>dispprop   = 3*(</p>
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> /</p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional,and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<p>emailprop  = 5*(</p>
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> / <a href="#SUMMARY">summary</a></p>
<p class="center">the following is REQUIRED, and MAY occur more than once</p>
<p class="center"><a href="#ATTENDEE">attendee</a> / </p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional, and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
<p class="center">the following are optional, and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<p>procprop   = 3*(</p>
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#ATTACH">attach</a> / <a href="#TRIGGER">trigger</a> /</p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional, and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> /
<a href="#REPEAT">repeat</a> /</p>
<p class="center">&quot;<a href="#DESCRIPTION">description</a>&quot; is optional, and MUST NOT occur more than once</p>
<p class="center"><a href="#DESCRIPTION">description</a> / </p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="VTIMEZONE"></a><h2>2.7  VTIMEZONE</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
<p>2*(</p>
<p class="center">&quot;<a href="#TZID">tzid</a>&quot; is required, but MUST NOT occur more than once</p>
<p class="center"><a href="#TZID">tzid</a> / </p>
<p class="center">&quot;<a href="#LAST-MODIFIED">last-mod</a>&quot; and &quot;<a href="#TZURL">tzurl</a>&quot; are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#LAST-MODIFIED">last-mod</a> / <a href="#TZURL">tzurl</a> /</p>
<p class="center">one of &quot;standardc&quot; or &quot;daylightc&quot; MUST occur and each MAY occur more than once.</p>
<p class="center">standardc / daylightc /</p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
<p class="center">standardc  = &quot;BEGIN&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
<p class="center">tzprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
<p class="center">daylightc  = &quot;BEGIN&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>
<p class="center">tzprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>

<p>tzprop     = 3*(</p>
<p class="center">the following are each REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#DTSTART">dtstart</a> / <a href="#TZOFFSETTO">tzoffsetto</a> / <a href="#TZOFFSETFROM">tzoffsetfrom</a> /</p>
<p class="center">the following are optional, and MAY occur more than once</p>
<p class="center"><a href="#COMMENT">comment</a> /<a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#TZNAME">tzname</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
<p>)</p>

<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="CalProps"></a><h2>2.8  Component Properties</h2>
<p>
A comprehensive table showing relation between <strong>calendar</strong> components and properties.
<a href="#VTIMEZONE">vtimezone</a> properties are not included.
</p>
<table>
<tr>
<td>0-1</td>
<td colspan="8">OPTIONAL property, MUST NOT occur more than once.</td>
</tr>
<tr>
<td>0-m</td>
<td colspan="8">OPTIONAL property, MAY occur more than once.</td>
</tr>
<tr>
<td>0&nbsp;/&nbsp;1=1</td>
<td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST the other</td>
</tr>
<tr>
<td>0*1</td>
<td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST NOT the other</td>
</tr>
<tr>
<td>1-m</td>
<td colspan="8">REQUIRED property, MAY occur more than once.</td>
</tr>
<tr>
<td>1</td>
<td colspan="8">REQUIRED property, MUST NOT occur more than once.</td>
</tr>
<tr>
<td colspan="9">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VEVENT">v<br>e<br>v<br>e<br>n<br>t</a></td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VTODO">v<br>t<br>o<br>d<br>o</a></td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VJOURNAL">v<br>j<br>o<br>u<br>r<br>n<br>a<br>l</a></td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VFREEBUSY">v<br>f<br>r<br>e<br>e<br>b<br>u<br>s<br>y</a></td>
<td class="bl top center" colspan="4"><a class="ref" href="#VALARM">v&nbsp;a&nbsp;l&nbsp;a&nbsp;r&nbsp;m</a></td>
</tr>
<tr>
<td class="bb">&nbsp;</td>
<td class="bl bb center ref"><br><br><br><br>a<br>u<br>d<br>i<br>o</td>
<td class="bl bb center ref"><br><br>d<br>i<br>s<br>p<br>l<br>a<br>y</td>
<td class="bl bb center ref"><br><br><br><br>e<br>m<br>a<br>i<br>l</td>
<td class="bl bb center ref">p<br>r<br>o<br>c<br>e<br>d<br>u<br>r<br>e</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ACTION">action</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ATTACH">attach</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-m</td>
<td class="blb">1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ATTENDEE">attendee</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1-m</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CATEGORIES">categories</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CLASS">class</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#COMMENT">comment</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#COMPLETED">completed</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CONTACT">contact</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CREATED">created</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DESCRIPTION">description</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">0-1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DTEND">dtend</a></td>
<td class="blb">0*1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DTSTAMP">dtstamp</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DTSTART">dtstart</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DUE">due</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">0*1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DURATION">duration</a></td>
<td class="blb">0*1</td>
<td class="blb">0*1</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#EXDATE">exdate</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#EXRULE">exrule</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#FREEBUSY_PROP">freebusy</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#GEO">geo</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#LAST-MODIFIED">last-mod</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb"></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#LOCATION">location</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ORGANIZER">organizer</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#PERCENT-COMPLETE">percent</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#PRIORITY">priority</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RDATE">rdate</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RECURRENCE-ID">recurid</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RELATED-TO">related</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#REPEAT">repeat</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RESOURCES">resources</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RRULE">rrule</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#REQUEST-STATUS">rstatus</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#SEQUENCE">sequence</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#STATUS">status</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#SUMMARY">summary</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#TRANSP">transp</a></td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#TRIGGER">trigger</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#UID">uid</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#URL">url</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#X-PROPERTY_PROP">x-prop</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
</tr>
</table>
<p>
If not set, the <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties
are automatically created by iCalcreator<br>
for <a href="#VEVENT">vevent</a>,<a href="#VTODO">vtodo</a>, <a href="#VJOURNAL">vjournal</a> and <a href="#VFREEBUSY">vfreebusy</a> components<br>
when using iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or <a href="#returnCalendar">returnCalendar</a><br>
or when fetching <a href="#DTSTAMP">DTSTAMP</a>/<a href="#UID">UID</a> property value with the component function <a href="#getProperty_PROP">getProperty</a>.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>

<a name="Function_list"></a><h1>3. Function list</h1>

<a name="iCalcreator_object_methods"></a><h2>3.1 iCalcreator object methods</h2>

<a name="Calendar_object_constructors"></a><h3>3.1.1 Constructors</h3>
<a name="vcalendar_constr"></a><h4>3.1.1.1 vcalendar</h4>
<p>Create a new <a href="#VCALENDAR">VCALENDAR</a> object.</p>
<p class="label">Format</p>
<p class="format">vcalendar::vcalendar( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="vevent_constr"></a><h4>3.1.1.2 vevent</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VEVENT">VEVENT</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vevent&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VEVENT">VEVENT</a> object.</p>
<p class="format">vevent::vevent( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$config    = $vcalendar-&gt;getConfig();
$vevent    = new vevent( $config );
$vevent-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vevent );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="vtodo_constr"></a><h4>3.1.1.3 vtodo</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VTODO">VTODO</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vtodo&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtodo     = &amp; $vcalendar-&gt;newComponent( &quot;vtodo&quot; );
$vtodo-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTODO">VTODO</a> object.</p>
<p class="format">vtodo::vtodo( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtodo     = new vtodo( $vcalendar-&gt;getConfig());
$vtodo-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vtodo );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="vjournal_constr"></a><h4>3.1.1.4 vjournal</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VJOUNAL">VJOURNAL</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vjournal&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vjournal  = &amp; $vcalendar-&gt;newComponent( &quot;vjournal&quot; );
$vjournal-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VJOURNAL">VJOURNAL</a> object.</p>
<p class="format">vjournal::vjournal( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vjournal  = new vjournal( $vcalendar-&gt;getConfig());
$vjournal-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vjournal );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="vfreebusy_constr"></a><h4>3.1.1.5 vfreebusy</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vfreebusy&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vfreebusy = &amp; $vcalendar-&gt;newComponent( &quot;vfreebusy&quot; );
$vfreebusy-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object.</p>
<p class="format">vfreebusy::vfreebusy( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vfreebusy = new vfreebusy( $vcalendar-&gt;getConfig());
$vfreebusy-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vfreebusy );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="valarm_constr"></a><h4>3.1.1.6 valarm</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VALARM">VALARM</a> object using an iCalcreator object component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">calendarComponent::newComponent( &quot;valarm&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;setProperty(...
...
$valarm    = &amp; $vevent-&gt;newComponent( &quot;valarm&quot; );
$valarm-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VALARM">VALARM</a> object.</p>
<p class="format">valarm::valarm( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent    = new vevent();
$vevent-&gt;setProperty(...
...
$valarm    = new valarm( $vevent-&gt;getConfig());
$valarm-&gt;setProperty(...
...
$vevent-&gt;setComponent( $valarm );
...
$vcalendar-&gt;setComponent( $vevent );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="vtimezone_constr"></a><h4>3.1.1.7 vtimezone</h4>
<p>
The vtimezone component describe, at a minimum, the base offset from <b>UTC</b> for the time zone.
For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
</p>
<p class="label">Format 1</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vtimezone&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object.</p>
<p class="format">vtimezone::vtimezone( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
$vtimezone-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vtimezone );
...
</p>
<br>
<h5>Creation of timezone components</h5>
<p>
It is possible to create timezone components, using a function in iCalUtilityFunctions class, <a href="#createTimezone">createTimezone</a>
and utilizing The <em>PHP</em> DateTimeZone class (<em>PHP</em> 5 >= 5.2.0).
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>

<a name="standard_constr"></a><h4>3.1.1.8 standard</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> <b>standard</b> object using an iCalcreator object component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty(...
...
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
$standard-&gt;setProperty(...
...
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
$daylight-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> STANDARD object.</p>
<p class="format">vtimezone::vtimezone( &quot;standard&quot; [, config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
$vtimezone-&gt;setProperty(...
...
$standard  = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
$standard-&gt;setProperty(...
...
$vtimezone-&gt;setComponent( $standard );
...
$daylight  = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig());
$daylight-&gt;setProperty(...
...
$vtimezone-&gt;setComponent( $daylight );
...
$vcalendar-&gt;setComponent( $vtimezone );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="daylight_constr"></a><h4>3.1.1.9 daylight</h4>
<p class="label">Format 1</p>
<p>Create a new <a name="VTIMEZONE">VTIMEZONE</a> <b>daylight</b> object using a component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
...
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
...
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> DAYLIGHT object.</p>
<p class="format">vtimezone::vtimezone( &quot;daylight&quot; [, config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
...
$standard  = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
...
$vtimezone-&gt;setComponent( $standard );
$daylight  = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig() );
...
$vtimezone-&gt;setComponent( $daylight );
$vcalendar-&gt;setComponent( $vtimezone );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>


<a name="iCalcreator_object_property_methods"></a><h3>3.1.2 iCalcreator object property methods</h3>

<a name="deleteProperty"></a><h4>3.1.2.1 deleteProperty</h4>
<p>Generic iCalcreator object deleteProperty method, simplifying removal of <strong>calendar</strong> properties.</p>
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( [ PropName [, order=1 ] )</p>
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
                    unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
order    = (int) if missing 1st/next occurrence,
                 used with multiple (property) occurrences
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( !$vcalendar-&gt;deleteProperty( &quot;method&quot; ))
&nbsp;&nbsp;echo "METHOD property not found";
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>


<a name="getProperty"></a><h4>3.1.2.2 getProperty</h4>
<p class="label">Format 1</p>
<p>Generic iCalcreator getProperty method, simplifying fetch of <strong>calendar</strong> properties.</p>
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
<p class="format">vcalendar::getProperty( [ PropName [, order=1 [, complete=FALSE ]]] )</p>
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
           unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
order    = (int) if missing 1st/next occurrence,
           used with multiply (property) occurrences
complete = (bool) FALSE (default) : output only property value
                  TRUE            : output = array( &quot;value&quot;=&gt; &lt;value&gt; ,&quot;params&quot; =&gt; &lt;parameter array&gt;)
</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$calscale  = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar    = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( )) { // <span class="comment">get x-properties</span>
.. .
</p>
<a name="getProperty2"></a>
<a name="geoLocation"></a>
<p class="label">Format 2</p>
<p>
Ability to fetch specific <i>component</i> property (unique) value(-s) and number of occurrence(-s).
 The search includes <b>ALL</b> components within the iCalcreator object instance.
</p>
<p>
Outputs an array( *[ (string) unique-property-value =&gt; (int) number_of_occurrence ] ) or an empty array if no hits.
The array is sorted by (asc.) key. If a property contains multiple values (like &quot;CATAGORIES:course1,courseB&quot; or
 &quot;RESOURCES:pc,camera&quot;), they are split into unique values.
</p>
<dl>
<dt>Supported Descriptive Component Properties
<dd><a href="#CATEGORIES">CATEGORIES</a>
<dd><a href="#LOCATION">LOCATION</a>
<dd>GEOLOCATION&nbsp;<sup>*1</sup>
<dd><a href="#PRIORITY">PRIORITY</a>
<dd><a href="#RESOURCES">RESOURCES</a>
<dd><a href="#STATUS">STATUS</a>
<dd><a href="#SUMMARY">SUMMARY</a>
<dt>Supported Date and Time Component Property
<dd><a href="#DTSTART">DTSTART</a>&nbsp;<sup>*2</sup>
<dt>Supported Relationship Component Properties
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*3</sup>
<dd><a href="#CONTACT">CONTACT</a>
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*3</sup>
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>&nbsp;<sup>*4</sup> (alt. &quot;R-UID&quot;)
<dd><a href="#RELATED-TO">RELATED-TO</a>
<dd><a href="#URL">URL</a>
<dd><a href="#UID">UID</a>
</dl>
<dl>
<dt><sup>*1</sup>
<dd>Using the non-standard directive &quot;GEOLOCATION&quot;, iCalcreator returns output supporting<br>
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
 (only if <a href="#GEO">GEO</a> is set).
<dt><sup>*2</sup>
<dd>Using <a href="#DTSTART">DTSTART</a> as argument returns dates in format &quot;YYYYMMDD&quot; (please note, dates within a <a href="#RDATE">RDATE</a>/<a href="#RRULE">RRULE</a>
 recurrence set are NOT included, only the origin start date (<a href="#DTSTART">DTSTART</a>)).
<dt><sup>*3</sup>
<dd>The <a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> output values are prefixed
 by &quot;protocol&quot; like &quot;MAILTO:hide@address.com&quot;.
<dt><sup>*4</sup>
<dd>Using &quot;RECURRENCE-ID-UID&quot; returns <a href="#UID">UID</a> values for component(-s) where <a href="#RECURRENCE-ID">RECURRENCE-ID</a> is set.
</dl>
<p>
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
</p>
<p>
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
</p>
<p class="format">vcalendar::getProperty( PropName )</p>
<p class="comment">propName = (string) case independent, property name</p>
<p class="label">Example 1</p>
<p>Fetch all attendees in the iCalcreator object instance.</p>
<p class="example">&lt;?php
.. .
$attendees = $vcalendar-&gt;getProperty( &quot;ATTENDEE&quot; );
foreach( $attendees as $attendee => $occurrCount ) {
.. .
</p>
<p class="label">Example 2</p>
<p>Fetch all DTSTARTs in the iCalcreator object instance.</p>
<p class="example">&lt;?php
.. .
$startDates = $vcalendar-&gt;getProperty( &quot;DTSTART&quot; );
foreach( $startDates as $startDate => $occurrCount ) {
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>


<a name="setProperty"></a><h4>3.1.2.3 setProperty</h4>
<p>Generic the iCalcreator object setProperty method,simplifying insert of <strong>calendar</strong> properties.</p>
<p>A successful update returns TRUE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
<p class="comment">propName = (string) case independent, strict [RFC5545] <strong>calendar</strong> property names,
                                      unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY">X-property</a>.
Proparg  = (mixed) property argument
           Last property argument is a (optional) property dependent parameters
           array( *[(string) key =&gt; (string) value ] ).
           A non-standard (, experimental) parameter key MUST be prefixed by &quot;X-&quot;.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>


<a name="CALSCALE"></a><h4>3.1.2.4 CALSCALE</h4>
<p>
This property defines the <strong>calendar</strong> scale used for the <strong>calendar</strong> information specified in the <strong>iCalendar</strong> object.
</p>
<p>
The default value is &quot;GREGORIAN&quot;, implied when missing.
</p>
<h5>Create CALSCALE</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createCalscale()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createCalscale();
...
</p>
<h5>Delete CALSCALE</h5>
<p>Remove CALSCALE from calendar.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( &quot;calscale&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;deleteProperty( &quot;CALSCALE&quot; );
...
</p>
<h5>Get Calscale</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty( &quot;calscale&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$calscale  = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
.. .
</p>
<h5>Set CALSCALE</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( &quot;calscale&quot;, value )</p>
<p class="comment">value = (string) calscale value</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>


<a name="METHOD"></a><h4>3.1.2.5 METHOD</h4>
<p>
This property defines the <strong>iCalendar</strong> object method associated with the <strong>calendar</strong> object.
</p>
<p>
METHOD property (value PUBLISH etc.) may be required when importing iCal files
into some calendaring software (MS etc.), as well as <a href="#X-PROPERTY">x-properties</a>
"X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
</p>
<h5>Create METHOD</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createMethod()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createMethod();
...
</p>
<h5>Delete METHOD</h5>
<p>Remove METHOD from calendar.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( &quot;METHOD&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;deleteProperty( &quot;METHOD&quot; );
...
</p>
<h5>Get METHOD</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty( &quot;method&quot; );</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$method    = $vcalendar-&gt;getProperty( &quot;method&quot; );
.. .
</p>
<h5>Set METHOD</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( &quot;method&quot;, value )</p>
<p class="comment">value = (string) method value</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;method&quot;, &quot;PUBLISH&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>


<a name="VERSION"></a><h4>3.1.2.6 VERSION</h4>
<p>
This property specifies the identifier corresponding to the version number of the <strong>iCalendar</strong> specification.
This property is always placed first in the <strong>calendar</strong> file.
</p>
<h5>Create Version</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createVersion()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createVersion();
...
</p>
<h5>Get Version</h5>
<p>Fetch property value.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty( &quot;version&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$version   = $vcalendar-&gt;getProperty( &quot;version&quot; )
.. .
</p>
<h5>Set Version</h5>
<p>Insert property value.
Only version 2.0 valid, version is <b>AUTO</b> generated at <strong>calendar</strong> creation.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( &quot;version&quot;, version )</p>
<p class="comment">version = (string) iCal version</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;version&quot;, &quot;2.0&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>

<a name="X-PROPERTY"></a><h4>3.1.2.7 X-PROPERTY</h4>
<p>
A <strong>calendar</strong>, non-standard property with a TEXT value and a name with an &quot;X-&quot; prefix. In a <strong>calendar</strong>,
an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
</p>
<p>
X-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"  may be required when importing iCal files
into some calendaring software (MS etc.), as well as <a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
</p>
<p>The value type is TEXT.</p>
<h5>Create X-property</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createXprop()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createXprop();
...
</p>
<h5>Delete X-PROPERTY</h5>
<p>Remove X-PROPERTY from <strong>calendar</strong>.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
<p class="label">Example 1</p>
<p>Delete the x-property named &quot;X-PROPERTY&quot;.</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;deleteProperty( &quot;X-PROPERTY&quot; );
...
</p>
<p class="label">Example 2</p>
<p>Delete all x-properties.</p>
<p class="example">&lt;?php
.. .
while( $vcalendar-&gt;deleteProperty())
  continue;
...
</p>
<h5>Get X-PROPERTY</h5>
<p>If set, returns property (name and) value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty()</p>
<p class="format">vcalendar::getProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
<p class="comment">output = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</p>
<p class="format">vcalendar::getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( propertyName<sup>1</sup>
              , array( &quot;value&quot;  =&gt; propertyData<sup>2</sup> )
                     , &quot;params&quot; =&gt; params<sup>3</sup>))
</p>
<p class="label">Example 1</p>
<p>Read all x-prop values in a loop.</p>
<p class="example">&lt;?php
.. .
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar    = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( )) { //<span class="comment">$xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
.. .
</p>
<p class="label">Example 2</p>
<p>If exists, read X-WR-TIMEZONE x-prop</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( $xprop = $vcalendar-&gt;getProperty( &quot;X-WR-TIMEZONE&quot; )) {
.. . // <span class="comment">$xprop = array( &quot;X-WR-TIMEZONE&quot;, propertyData<sup>2</sup> )</span>
.. .
</p>
<p class="label">Example 3</p>
<p class="example">&lt;?php
.. .
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar    = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( FALSE, FALSE, TRUE )) {
     /* <span class="comment">$xprop = array( propertyName<sup>1</sup>
                                         , array( &quot;value &quot;   =&gt; propertyData<sup>2</sup>
                                                   , &quot;params &quot;=&gt; params<sup>3</sup> ))</span>
     */
.. .
</p>
<h5>Set X-PROPERTY</h5>
Insert property name and value. If an x-prop with the same name already exists, it will be replaced.
PropertyNames are always stored upperCase, ex. x-wr-calname =&gt; X-WR-CALNAME.
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( propertyName, propertyData [, params ] )</p>
<p class="comment">propertyName<sup>1</sup> = (string) Any property name with a &quot;X-&quot; prefix
propertyData<sup>2</sup> = (string) Value type TEXT
params<sup>3</sup>       = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams] )
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo   = (int) ordernumber, 1=1st, 2=2nd etc
lang<sup>*</sup>         = as defined in [RFC5646]
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config ); // initiate new CALENDAR
     // <span class="comment">set some X-properties.. .</span>
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;,  &quot;Calendar Sample&quot; )
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;,  &quot;Calendar Description&quot; );
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>

<a name="iCalcreator_component_object_methods"></a><h3>3.1.3 iCalcreator component object methods</h3>

<a name="deleteComponent"></a><h4>3.1.3.1 deleteComponent</h4>
<p>
Remove component from the iCalcreator object instance.<br>
FALSE is returned if no property exists or when end-of-properties at consecutive function calls.
</p>
<p class="label">format 1</p>
Remove component with order number (1st=1, 2nd=2.. .).
<p class="format">vcalendar::deleteComponent( orderNumber )</p>
<p class="comment">orderNumber = (int) order number</p>
<p class="label">format 2</p>
<P>Remove component with component type (e.g. &quot;vevent&quot;) and order 1 alt. suborder number.</p>
<p class="format">vcalendar::deleteComponent( componentType [, componentSuborderNumber])</p>
<p class="comment">componentType           = (string) component type
componentSuborderNumber = (int) order number</p>
<p class="label">format 3</p>
<p>Remove component with <a href="#UID">UID</a>. N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.</p>
<p class="format">vcalendar::deleteComponent( <a href="#UID">UID</a> )</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$vcalendar-&gt;deleteComponent( 1 );
$vcalendar-&gt;deleteComponent( &quot;vtodo&quot;, 2 );
$vcalendar-&gt;deleteComponent( &quot;20070803T194810CEST-hide@address.com&quot;);
.. .
</p>
<p class="label">Example 2</p>
<p>Deleting all components, using format 2 without order number.</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
.. .
while( $vcalendar-&gt;deleteComponent( &quot;vevent&quot;))
  continue;
.. .
$vtodo = $vcalendar-&gt;getComponent( &quot;vtodo&quot; );
while( $vtodo-&gt;deleteComponent( &quot;valarm&quot;))
  continue;
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>

<a name="getComponent"></a><h4>3.1.3.2 getComponent</h4>
<p>Get component from the iCalcreator object instance.</p>
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
<p class="label">format 1</p>
<p>Get next component, until end-of-components.</p>
<p class="format">vcalendar::getComponent()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config      = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar   = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $comp = $vcalendar-&gt;getComponent()) {
.. .
}
.. .
</p>
<p class="label">format 2</p>
<P>Get specific component with order number (1st=1, 2nd=2.. .).</p>
<p class="format">vcalendar::getComponent( orderNumber )</p>
<p class="comment">orderNumber = (int) order number</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( $comp  = $vcalendar-&gt;getComponent( 1 )) {
.. .
}
.. .
</p>

<p class="label">format 3</p>
<p>
Get (first/next) component with component type (until end-of-components) alt.
get specific component with component type and suborder number (1st=1, 2nd=2.. .).
</p>
<p class="format">vcalendar::getComponent( componentType [, componentSuborderNumber])</p>
<p class="comment">componentType           = (string) component type
componentSuborderNumber = (int) order number</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( $comp  = $vcalendar-&gt;getComponent( &quot;vtodo&quot;, 2 )) {
.. .
}
.. .
</p>

<p class="label">format 4</p>
<p>
Get (first/next) component with <a href="#UID">UID</a> as key.
(<a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.)
</p>
<p class="format">vcalendar::getComponent( <a href="#UID">UID</a> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$uid       = &quot;20070803T194810CEST-hide@address.com&quot;;
if( $comp  = $vcalendar-&gt;getComponent( $uid )) {
.. .
}
.. .
</p>

<a name="getComponent5"></a>
<p class="label">format 5</p>
<p>
Get (first/next) component based on specific property contents:
</p>
<dl>
<dt>Supported Descriptive Component Properties
<dd><a href="#CATEGORIES">CATEGORIES</a>
<dd><a href="#LOCATION">LOCATION</a>
<dd><a href="#PRIORITY">PRIORITY</a>
<dd><a href="#RESOURCES">RESOURCES</a>
<dd><a href="#STATUS">STATUS</a>
<dd><a href="#SUMMARY">SUMMARY</a>
<dt>Date and Time Component Properties
<dd><a href="#COMPLETED">COMPLETED</a>
<dd><a href="#DTEND">DTEND</a>
<dd><a href="#DUE">DUE</a>
<dd><a href="#DTSTART">DTSTART</a>
<dt>SupportedRelationship Component Properties
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
<dd><a href="#CONTACT">CONTACT</a>
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>
<dd><a href="#RELATED-TO">RELATED-TO</a>
<dd><a href="#URL">URL</a>
<dd><a href="#UID">UID</a>
<dt>Change Management Component Properties
<dd><a href="#CREATED">CREATED</a>
<dd><a href="#DTSTAMP">DTSTAMP</a>
<dd><a href="#LAST-MODIFIED">LAST-MODIFIED</a>
</dl>
<dl>
<dt><sup>*1</sup>
<dd><a href="#ATTENDEE">ATTENDEE</a> and
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by protocol ex. &quot;MAILTO:hide@address.com&quot;.
</dl>
<p>
For the property &quot;SUMMARY&quot; ,if a search value (any case) exists within property value, a hit exists.
For the other, non-date, properties an exact (strict case) match is required.
</p>
<p>
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
</p>
<p>
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components, 
use <a href="#getProperty2">getProperty</a> (Format 2).
</p>
<p class="format">vcalendar::getComponent( search )</p>
<p class="comment">
search       = (array) ( *[ propertyName =&gt; uniqueValue ]), multiple array elements are combined by &quot;OR&quot;
propertyName = (string) property name, above
propertyData = (string) unique property value (strict case),
               date format &quot;YYYYMMDD&quot; (if any side is DATE, only dates are used),
               datetime format &quot;YYYYMMDDTHHMMSS&quot;</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $comp  = $vcalendar-&gt;getComponent( array( &quot;RESOURCES&quot; =&gt; &quot;PC&quot; )) {
.. .
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>

<a name="newComponent"></a><h4>3.1.3.3 newComponent</h4>
<P>
Create component (<a href="#VEVENT">VEVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a> / <a href="#VTIMEZONE">VTIMEZONE</a>)
using a iCalcreator object factory-method, returning a reference to the new component.
</p>
<p class="label">Format</p>
<p class="format">vcalendar::newComponent( componentType )</p>
<p class="comment">componentType = (string) component type</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
...
</p>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>

<a name="selectComponents"></a><h4>3.1.3.4 selectComponents</h4>
<p class="label">Format 1</p>
<p>
Selects  <a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> /
<a href="#VFREEBUSY">VFREEBUSY</a> components from the iCalcreator object instance on based on <b>dates</b>
(notice <a href="#date_restriction">date restriction</a>), based on the initial <a href="#DTSTART">DTSTART</a>
property along with the <a href="#RRULE">RRULE</a>, <a href="#RDATE">RDATE</a>, <a href="#EXDATE">EXDATE</a>
and <a href="#EXRULE">EXRULE</a> properties in the component.
</p>
<p>Requirement:</p>
<ul>
<li>The property <a href="#DTSTART">DTSTART</a> is required.<br>If missing in a <a href="#VTODO">VTODO</a> component then <a href="#DTSTART">DUE</a> is used.<br>
<li><a href="#sort">sort</a> <b>MUST</b> be executed before &quot;selectComponents&quot;, notice example below.
</ul>
<p>Limitations:</p>
<ul>
<li>The values &quot;SECONDLY&quot; / &quot;MINUTELY&quot; / &quot;HOURLY&quot; in the &quot;FREQ&quot; rule part are NOT supported.
<li>If using components with properties<br>
<a href="#UID">UID</a> in combination with <a href="#SEQUENCE">SEQUENCE</a> and <a href="#RECURRENCE-ID">RECURRENCE-ID</a><br>
(i.e. an individual instance within the recurrence set),<br>
the <a href="#RECURRENCE-ID">RECURRENCE-ID</a> parameter &quot;RANGE&quot; (&quot;THISANDPRIOR&quot; / &quot;THISANDFUTURE&quot;) is NOT supported.<br>
</ul>
<p>FALSE is returned if no selected component exists.</p>
<p class="format">vcalendar::selectComponents([ startYear, startMonth, startDay
                [, endYear,   endMonth,   endDay
                [, cType [, flat [, any [, split]]]]]])
</p>
<p>
Returns an array with components (events.. .).
For all recurrent instances of a <strong>calendar</strong> component, an x-property,
&quot;X-CURRENT-DTSTART&quot; and opt. also &quot;X-CURRENT-DTEND&quot; alt. &quot;X-CURRENT-DUE&quot;,
has been created with a TEXT content, &quot;Y-m-d&nbsp;[H:i:s][timezone/UTC&nbsp;offset]&quot;
showing the current start and opt. also end alt. due date.<br>
Also a &quot;X-RECURRENCE&quot; x-property is set with order number (valid if selectComponents is called from DTSTART date).
</p>
<p class="comment">startYear  : (int) start year  (4*digit),   default current year
startMonth : (int) start month (1-2*digit), default current month
startDay   : (int) start day   (1-2*digit), default current day
endYear    : (int) end year    (4*digit),   default startYear
endMonth   : (int) end month   (1-2*digit), default startMonth
endDay     : (int) end day     (1-2*digit), default startDay
cType      : (mixed) <strong>calendar</strong> component type(-s), (string/array)
                   (&quot;vevent&quot;, &quot;vtodo&quot;, &quot;vjournal&quot;, &quot;vfreebusy&quot;)
             (bool) FALSE (default) =&gt; all
flat       : (bool) TRUE =&gt; output : array[] (ignores split)
               component where recurrence pattern exists within period
             FALSE (default) =&gt; output : array[Year][Month][Day][]
any        : (bool) TRUE (default) =&gt; select components with recurrence within period
                    FALSE =&gt; only components that starts (DTSTART) within period
split      : (bool) TRUE (default) =&gt; one component copy for every day it occurs
                                      within the period
                    FALSE =&gt; one occurrence of component in output array,
                             start date/recurrence (start) date

valid         flat    any     split
combinations                          (defaults in upper case)
           1  FALSE   TRUE    TRUE
           2  FALSE   TRUE    false
           3  FALSE   false   [false] (split set to false if flat=FALSE and any=false)
           4  true    TRUE    [false] (split set to false if flat=true)
           5  true    false   [false] (split set to false if flat=true)
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config     = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                     &quot;directory&quot; =&gt; &quot;import&quot;,
                     &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar  = new vcalendar( $config );
$vcalendar-&gt;parse();
$vcalendar-&gt;sort();
$events_arr = $vcalendar-&gt;selectComponents( 2007, 11, 1, 2007, 11, 30, &quot;vevent&quot; );
 // <span class="comment">select all events occurring 1-30 nov. 2007</span>
foreach( $events_arr as $year =&gt; $year_arr ) {
  foreach( $year_arr as $month =&gt; $month_arr ) {
    foreach( $month_arr as $day =&gt; $day_arr ) {
      foreach( $day_arr as $event ) {
        $currddate   = $event-&gt;getProperty( &quot;x-current-dtstart&quot; );
        <span class="comment">// if member of a recurrence set, returns
       // array(&quot; x-current-dtstart&quot;,
       // &lt;(string) date(&quot;Y-m-d&nbsp;[H:i:s][timezone/UTC&nbsp;offset]&quot;)&gt;)</span>
        $startDate   = $event-&gt;getProperty( &quot;dtstart&quot; );
        $summary     = $event-&gt;getProperty( &quot;summary&quot; );
        $description = $event-&gt;getProperty( &quot;description&quot; );
        .. .
        .. .
</p>
<a name="selectComponents2"></a>
<p class="label">format 2</p>
<p>
Using this format, the iCalcreator object method selects components based on specific property value(-s).
</p>
<dl>
<dt>Supported Descriptive Component Properties
<dd><a href="#CATEGORIES">CATEGORIES</a>
<dd><a href="#LOCATION">LOCATION</a>
<dd><a href="#PRIORITY">PRIORITY</a>
<dd><a href="#RESOURCES">RESOURCES</a>
<dd><a href="#STATUS">STATUS</a>
<dd><a href="#SUMMARY">SUMMARY</a>
<dt>Supported Relationship Component Properties
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
<dd><a href="#CONTACT">CONTACT</a>
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
<dd><a href="#RELATED-TO">RELATED-TO</a>
<dd><a href="#URL">URL</a>
<dd><a href="#UID">UID</a>
</dl>
<dl>
<dt><sup>*1</sup>
<dd><a href="#ATTENDEE">ATTENDEE</a> and
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by (upper case) protocol like &quot;MAILTO:hide@address.com&quot;.
</dl>
<p>
For the property <a href="#SUMMARY">SUMMARY</a>, if a search value (any case) exists within property value, a hit is found.
For the other properties an exact (strict case) match is required. Multiple search properties may coexist.
</p>
<p>
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components, 
use <a href="#getProperty2">getProperty</a> (Format 2).
</p>
<p>
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
</p>
<p class="format">vcalendar::selectComponents( searchArray )</p>
<p>Outputs an array of matched (unique) components in <a href="#UID">UID</a> order.</p>
<p class="comment">searchArray   : (array) *( propertyName =&gt; propertyValue )
propertyName  : (string) above (any case)
propertyValue : (string) value / (array) ( *[ (string) value] )
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config        = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                        &quot;directory&quot; =&gt; &quot;import&quot;,
                        &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar     = new vcalendar( $config );
$vcalendar-&gt;parse();
$vcalendar-&gt;sort();
$searchArray   = array( &quot;PRIORITY&quot; =&gt; array( 1, 2, 3, 4 ));
$highPrioArr   = $vcalendar-&gt;selectComponents( $searchArray );
 // <span class="comment">select all components with PRIORITY set to high (1-4)</span>
if( !empty( $highPrioArr )) {
  $highPrioCal = new vcalendar( array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; ));
  $highPrioCal-&gt;setProperty( "X-WR-CALDESC", "High priority events" );
  foreach( $highPrioArr as $highPrioComponent )
    $highPrioCal-&gt;setComponent( $highPrioComponent );
  $highPrioCal-&gt;returnCalendar();
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>

<a name="setComponent"></a><h4>3.1.3.5 setComponent</h4>
<p>
Replace or update component in the iCalcreator object instance.
Also add a <strong>calendar</strong> component to the iCalcreator object instance
when <strong>calendar</strong> component is created with the procedural (<b>non</b>-factory) method,
see example <a href="#vevent_constr">VEVENT</a>, format 2.
</p>
<p>A successful update returns TRUE.</p>
<p class="label">format 1</p>
<p>Insert last in component chain.</p>
<p class="format">vcalendar::setComponent( component )
addComponent( component ) // <span class="comment">alias</span></p>
<p class="comment">component = (object) iCalcreator component instance</p>
<p class="comment">addComponent, may be removed in future versions.</p>
<p class="label">format 2</p>
<p>
Insert/replace component with order number (1st=1, 2nd=2.. .).
If replace and orderNumber is not found, component is inserted last in chain.
</p>
<p class="format">vcalendar::setComponent( component, orderNumber )</p>
<p class="comment">component = (object) iCalcreator component instance
int       = (int) order numder</p>
<p class="label">format 3</p>
<p>
Replace component with component type and 1st alt. component order number.
If orderNumber is not found, component is inserted last in chain.
</p>
<p class="format">vcalendar::setComponent( component, componentType [, componentSuborderNo])</p>
<p class="comment">component           = (object) iCalcreator component instance
componentType       = (string) component type
componentSuborderNo = (int) component Suborder Number</p>
<p class="label">format 4</p>
<p>
Replace component with <a href="#UID">UID</a>.
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.
If <a href="#UID">UID</a> is not found, component is inserted last in chain.
</p>
<p class="format">vcalendar::setComponent( component, <a href="#UID">UID</a> )</p>
<p class="comment">component = (object) iCalcreator component instance</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$vevent    = vcalendar-&gt;getComponent( 1 ); // <span class="comment">fetch first EVENT</span>
$vevent-&gt;setProperty( &quot;dtstart, 2006, 12, 24, 19, 30, 00 );
                                           // <span class="comment">update <a class="ref" href="#DTSTART">DTSTART</a> property</span>
$vcalendar-&gt;setComponent( $vevent, 1 );    // <span class="comment">replace first component</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>

<a name="iCalcreator_inputoutput_methods"></a><h3>3.1.4 iCalcreator input/output methods</h3>

<a name="parse_merge"></a><h4>3.1.4.1 parse and merge</h4>
<p>
Parse iCal file(-s) or string/array <strong>calendar</strong> content into a single iCalcreator object instance (components, properties and parameters),
including multiple vcalendars (within a single ICS file) parse, e.g. Oracle Calendar exports.
</p>
<p>
As long as php.ini directive &quot;allow_url_fopen&quot; is enabled, remote files, URLs; protocol &quot;http&quot; (&quot;webcal&quot;), are supported.
 A remote file, URL, <b>must</b> be prefixed by &quot;http://&quot; (&quot;webcal://&quot;) and suffixed by a valid filename.!
 Recommendation is to download (cache) remote file before parsing, due to execution time and control.
</p>
<p>
If missing, component property <a href="#UID">UID</a> is created when parsing.
 For that reason <a href="#Unique_id">UNIQUE_ID</a> might need to be set before parsing, Se examples below.
</p>
<p>
Notice <a href="#date_restriction">date restriction</a>!
</p>
<p>
If major parse error occurs (like file access error, invalid <strong>calendar</strong> file or <strong>calendar</strong> file without components), FALSE is returned.
</p>
<p>
Minor errors like non-standard line-endings, initial and trailing empty lines
 as well as files without proper end line(-s) (i.e. missing component end and/or &quot;END:CALENDAR&quot; iCal directives)
 are managed.
</p>
<p>
Except the <a href="#X-PROPERTY_PROP">X-properties</a>, non-standard properties are ignored.
</p>
<p class="label">Format</p>
<p class="format">vcalendar::parse( [ textToParse ] )</p>
<p class="comment">textToParse = (string) calendarContent
                       ex. result from - file_get_contents( &quot;filename&quot;)
              (array)  calendarContent
                       ex. result from - file( &quot;filename&quot;, FILE_IGNORE_NEW_LINES )</p>
<p class="label">parse example 1</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
.. .
</p>
<p class="label">parse example 2</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;url&quot;       =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
.. .
</p>
<p class="label">parse example 3</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;url&quot;       =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
$vcalendar = new vcalendar( $config );
...
$str       = array(
&quot;BEGIN:VCALENDAR&quot;,
&quot;PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.14//&quot;,
&quot;VERSION:2.0&quot;,
&quot;BEGIN:VEVENT&quot;,
&quot;DTSTART:20101224T190000Z&quot;,
&quot;DTEND:20101224T200000Z&quot;,
&quot;DTSTAMP:20101020T103827Z&quot;,
&quot;UID:20101020T113827-hide@address.com&quot;,
&quot;DESCRIPTION:example&quot;,
&quot;END:VEVENT&quot;,
&quot;END:VCALENDAR&quot;);
$vcalendar-&gt;parse( $str );
...
</p>
<p class="label">merge example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;directory&quot; =&gt; &quot;import&quot; );
$vcalendar = new vcalendar( $config );

$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file1.ics&quot; );
$vcalendar-&gt;parse();

$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file2.ics&quot; );
$vcalendar-&gt;parse();

$vcalendar-&gt;sort();
$vcalendar-&gt;setConfig( &quot;directory&quot;,&nbsp;&quot;export&quot; );
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;icalmerge.ics&quot; );
$vcalendar-&gt;saveCalendar();
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>

<a name="createCalendar"></a><h4>3.1.4.2 createCalendar</h4>
Generate and return <strong>calendar</strong> in a string, testing.. .?
<p class="label">Format</p>
<p class="format">vcalendar::createCalendar()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createCalendar();
echo $str;
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>

<a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
<p>
Redirect the iCalcreator object instance content to user browser. Filename, addressed to browser, is automatically generated if missing or not set;<br>
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
</p>
<p class="label">Format</p>
<p class="format">vcalendar::returnCalendar( [ utf8Encode [, gzip ]] )</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</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
.. .
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;setProperty( &quot;dtstart&quot;, array( &quot;year&quot;  =&gt; 2007
                                      , &quot;month&quot; =&gt; 4
                                      , &quot;day&quot;   =&gt; 1
                                      , &quot;hour&quot;  =&gt; 19 ));
$vevent-&gt;setProperty( &quot;duration&quot;, 0, 0, 3 ));
$vevent-&gt;setProperty( &quot;LOCATION&quot;, &quot;Central Plaza&quot; );
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
.. .
$vcalendar-&gt;returnCalendar();
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config     = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                     &quot;directory&quot; =&gt; &quot;import&quot;,
                     &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar  = new vcalendar( $config );
$vcalendar-&gt;parse();
$utf8Encode = TRUE;
if( isset( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ) &amp;&amp;
  ( FALSE !== strpos( strtolower( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ), &quot;gzip&quot; )))
  $gzip     = TRUE;
else
  $gzip     = FALSE;
$vcalendar-&gt;returnCalendar( $utf8Encode, $gzip );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>

<a name="saveCalendar"></a><h4>3.1.4.4 saveCalendar</h4>
<p>
Save the iCalcreator object instance in a file, uses present directory if directory not set, filename is automatically generated if missing or not set;<br>
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
</p>
<p>Directory/filename <b>must</b> be writeable, delimiter default <em>PHP</em> constant DIRECTORY_SEPARATOR.</p>
<p>If file error occurs, FALSE is returned.</p>
<p class="label">Format</p>
<p class="format">vcalendar::saveCalendar ( [ directory [, filename [, delimiter ]]] )</p>
<p class="comment">directory = (string) directory, default FALSE
filename  = (string  file name, default FALSE
delimiter = (string) path directory/filename separator, default FALSE</p>
Parameters for <span class="format">directory/filename/delimiter</span>, kept for backward compatibility,
may be removed i future versions. Recommendation is to use <span class="format">setConfig</span>, Se
example below.
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;setConfig( array( &quot;directory&quot; =&gt; &quot;depot&quot;,
                              &quot;filename&quot;  =&gt; &quot;calendar.ics&quot; ));
$result = $vcalendar-&gt;saveCalendar();
if( !$result )
&nbsp;&nbsp;echo &quot;error when saving.. .&quot;
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>

<a name="sort"></a><h4>3.1.4.5 sort</h4>
<p class="label">Format 1</p>
<p>
Sort created/parsed <strong>calendar</strong> components on the following (prioritized) keys:<br>
1 - X-CURRENT-DTSTART - X-CURRENT-DTEND/X-CURRENT-DUE<br>
&nbsp;&nbsp;&nbsp;&nbsp;(if created in iCalcreator object method <a href="#selectComponents">selectComponents</a>)<br>
1 - <a href="#DTSTART">DTSTART</a> - <a href="#DTEND">DTEND</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VEVENT">VEVENT</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components)<br>
1 - <a href="#DTSTART">DTSTART</a> - <a href="#DUE">DUE</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VTODO">VTODO</a> components)<br>
1 - <a href="#DTSTART">DTSTART</a> (<a href="#VJOURNAL">VJOURNAL</a> components)<br>
2 - <a href="#CREATED">CREATED</a> / <a href="#DTSTAMP">DTSTAMP</a><br>
3 - <a href="#UID">UID</a><br>
A date value, like &quot;DTSTART;VALUE=DATE:20120717&quot;, are sorted before a datetime value.<br>
<a href="#VTIMEZONE">VTIMEZONE</a> component(-s) is always placed first (ordered by <a href="#TZID">TZID</a>). The
<a href="#VTIMEZONE">STANDARD</a>&nbsp;/&nbsp;<a href="#VTIMEZONE">DAYLIGHT</a>&nbsp; sub-components are sorted (on asc. key <a href="#DTSTART">DTSTART</a>) when calling
<a href="#createCalendar">createCalendar</a> (or <a href="#returnCalender">returnCalender</a>).
<br>
<a href="#VALARM">ALARM</a> sub-components, if exists, are not sorted.

</p>
<p class="format">vcalendar::sort()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;directory&quot; =&gt; &quot;import&quot;,
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$vcalendar-&gt;sort();
$vcalendar-&gt;returnCalendar();
...
</p>

<p class="label">Format 2</p>
<p>
Sort created/parsed <strong>calendar</strong> components on specific property values and ascending order.
 If a property is not set in component, an empty sort key is used (i.e. sorted first).
</p>
<p class="format">vcalendar::sort( sortArgument )</p>
<p class="comment">sortArgument: (string) &quot;<a href="#ATTENDEE">ATTENDEE</a>&quot; / &quot;<a href="#CATEGORIES">CATEGORIES</a>&quot; / &quot;<a href="#CONTACT">CONTACT</a>&quot; / &quot;<a href="#DTSTAMP">DTSTAMP</a>&quot; /
                       &quot;<a href="#LOCATION">LOCATION"</a>&quot; / &quot;<a href="#ORGANIZER">ORGANIZER</a>&quot; / &quot;<a href="#PRIORITY">PRIORITY</a>&quot; /
                       &quot;<a href="#RESOURCES">RESOURCES</a>&quot; / &quot;<a href="#STATUS">STATUS</a>&quot; / &quot;<a href="#SUMMARY">SUMMARY</a>&quot; / &quot;<a href="#URL">URL</a>&quot;.
                       For a property where multiple occurrence may exist
                       (<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#CONTACT">CONTACT</a>, <a href="#RESOURCES">RESOURCES</a>)
                       lowest (alphabetic) value is used as sort key.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>

<a name="useCachedCalendar"></a><h4>3.1.4.6 useCachedCalendar</h4>
<p>
If recent version of local (non-empty and saved) <strong>calendar</strong> file exists, an HTTP redirect header is sent otherwise FALSE is returned.
</p>
<p class="label">Format</p>
<p class="format">vcalendar::useCachedCalendar( [ timeout ] )</p>
<p class="format">vcalendar::useCachedCalendar( [ directory [, filename [, delimiter [, timeout ]]]] )</p>
<p class="comment">directory = (string) directory, default FALSE
filename  = (string  file name, default FALSE
delimiter = (string) path directory/filename separator, default FALSE
timeout   = (int) default 3600 sec
Second format with parameters for <span class="format">directory/filename/delimiter</span>,<br>kept for backward compatibility, may be removed i future<br>versions. Recommendation is to use <span class="format">setConfig</span>, Se example below.</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
$vcalendar-&gt;setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
$vcalendar-&gt;useCachedCalendar();
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>

<a name="iCalcreator_configuration_methods"></a><h3>3.1.5 iCalcreator configuration methods</h3>

<a name="configKeys"></a><h4>3.1.5.1 configuration keys</h4>
<p>All configuration keys (allowEmpty, compsInfo etc.) case independent.</p>
<table>
<tr>
<td class="bl bb">key</td>
<td class="bl bb"><strong>calendar</strong></td>
<td class="bl bb">component</td>
<td class="bl bb">remark</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#allowEmpty">allowEmpty</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Compsinfo">Compsinfo</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">getConfig only</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Delimiter">Delimiter</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Directory">Directory</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Filename">Filename</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Dirfile">Dirfile</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">getConfig only</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Filesize">Filesize</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">getConfig only</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Format">Format</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Language">Language</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#NewlineChar">NewlineChar</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#dTZID">TZID</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Unique_id">Unique_id</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#configURL">URL</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
</table>
<br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="getConfig"></a><h4>3.1.5.2 getConfig</h4>
<p class="format">vcalendar::getConfig( [ key ] )</p>
<p class="comment">key = (string) config key</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$filename = $vcalendar-&gt;getConfig( &quot;filename&quot; );
.. .
</p>
In this example, notice <a href="#Filename">Filename</a>
<br>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = $vcalendar-&gt;getConfig();
.. .
</p>
<p class="comment">Output= array( string key =&gt; mixed value
           *[, string key =&gt; mixed value] )</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="initConfig"></a><h4>3.1.5.3 calendar/component initialization</h4>
<p class="label">Format</p>
<p>Create a new iCalcreator object instance.</p>
<p class="format">vcalendar::vcalendar( [ config ] )</p>
<p class="comment">config = (array) ( *[, key =&gt; value] )
key    = (string) config key
value  = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;directory&quot; =&gt; &quot;import&quot;,
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
.. .
</p>
<p>Create a new <strong>calendar</strong> component.</p>
<p class="format">vcalendar::component( [ config ] )</p>
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
key    = (string) config key
value  = (mixed) config value</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vevent = new vevent( $config );
.. .
</p>
<p class="label">Example 3</p>
<p class="example">&lt;?php
.. .
$config = $vcalendar-&gt;getConfig();
$vevent = new vevent( $config );
.. .
</p>
<p>Only component relevant configuration are set. If using the <a href="#newComponent">newComponent</a> function, configuration is set automatically.</p>
<br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="setConfig"></a><h4>3.1.5.4 setConfig</h4>
<p>A successful &quot;setConfig&quot; returns TRUE.</p>
<p class="label">Format 1</p>
<p class="format">vcalendar::setConfig( [ config ] )</p>
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
key    = (string) config key
value  = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;directory&quot; =&gt; &quot;import&quot;,
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar();
$vcalendar-&gt;setConfig( $config );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vevent = new vevent();
$vevent-&gt;setConfig( $config );
.. .
</p>
<p class="label">Format 2</p>
<p class="format">vcalendar::setConfig( key, value )</p>
<p class="comment">key    = (string) config key
value  = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$vcalendar = new vcalendar();
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$vevent = new vevent();
$vevent-&gt;setConfig( &quot;unique_id&quot;, &quot;kigkonsult.se&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="allowEmpty"></a><h4>3.1.5.5 Allow empty components</h4>
<p>
Allow or reject empty <strong>calendar</strong> properties. Used in <a href="#createCalendar">createCalendar</a>, <a href="#returnCalender">returnCalender</a> or
create&lt;Property&gt; methods, creating [RFC5545] formats.
</p>
<p>
Default TRUE (allow).
</p>

<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="Compsinfo"></a><h4>3.1.5.6 Component information</h4>
<p>Only to use with iCalcreator object method getConfig.</p>
<p>
Get information about the iCalcreator object instance components. Returns array with basic information
about all components (in array format) within the iCalcreator object instance.
</p>
<p class="comment">Output   = array ( *compinfo )
compinfo = array ( &quot;ordno&quot; =&gt; int ordno,
                   // <span class="commsnt">order number (1st=1, 2nd=2..)</span>
                 , &quot;type&quot;  =&gt; string type
                   // <span class="comment">component type (vevent, vtodo.. .</span>
                 , &quot;uid&quot;   =&gt; string uid
                   // <span class="comment">component <a href="#UID">UID</a> (not for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a>)</span>
                 , &quot;props&quot; =&gt;
                     array( *[ propertyName =&gt; Property count ])
                   // <span class="comment">for every set property</span>
                 , &quot;sub&quot;   =&gt; array( *compinfo ))
                   // <span class="comment">if subcomponents exists, an array for each subcomponent</span></p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
                    &quot;directory&quot; =&gt; &quot;import&quot;,
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$compsinfo = $vcalendar-&gt;getConfig( &quot;compsinfo&quot; );
foreach( $compsinfo as compinfo) {
&nbsp;&nbsp;echo &quot; order number : &quot;.$compinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;echo &quot; type : &quot;.$compinfo[&quot;type&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;echo &quot; UID : &quot;.$compinfo[&quot;uid&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;foreach( $compinfo[&quot;props&quot;] as $propertyName =&gt; $propertyCount )
&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;  $propertyName = $propertyCount&quot;;
&nbsp;&nbsp;if( is_array( $compinfo[&quot;sub&quot;] )) {
&nbsp;&nbsp;&nbsp;&nbsp;foreach( $compinfo[&quot;sub&quot;] as $subcompinfo ) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; order number : &quot;.$subcompinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* .. dito if subcomponents exists .. . */
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="Delimiter"></a><h4>3.1.5.7 Delimiter</h4>
<p>Directory/filename delimiter.</p>
<p>
Default <em>PHP</em> constant DIRECTORY_SEPARATOR. If used, <b>must</b> be set BEFORE filename!
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="Directory"></a><h4>3.1.5.8 Directory</h4>
<p>
Local directory to store/read iCal files.
</p>
<p>
Default &quot;<b>.</b>&quot;.
</p>
<p>
Directory <b>must</b> be set BEFORE <a href="#Filename">filename</a> and <b>must</b> exist and be writeable otherwise FALSE is returned.
If set using an config array and together with <a name="Filename"><u>Filename</u></a>, Directory are set automatically first.
When setting Directory, any previously set <a href="#configURL">URL</a> is removed.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="Fileinfo"></a><h4>3.1.5.9 Fileinfo</h4>
<p>
Only available in iCalcreator object method getConfig, giving information in array format about <a href="#Directory">directory</a>,
<a href="#Filename">filename</a> and <a href="#Filesize">filesize</a>.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$fileinfo = $vcalendar-&gt;getConfig( &quot;fileinfo&quot; );
.. .
</p>
<p class="comment">output = array( &lt;directory&gt;, &lt;filename&gt;, &lt;filesize&gt; )</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="Filename"></a><h4>3.1.5.10 Filename</h4>
<p>iCal local file name, default created like (if not set):</p>
<p class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot;;</p>
<p class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.xml&quot;; <span class="comment"> // if <a href="#Format">format</a> set to &quot;xcal&quot;</span></p>
<p>
If not set, filename is created when requested, ex. in iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or getConfig(&quot;filename&quot;).
</p>
<p>
Local filename <b>must</b> be set AFTER setting directory (and opt. delimiter)!
Filename (and opt. directory) <b>must</b> be readable/writeable otherwise FALSE is returned.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>

<a name="Filesize"></a><h4>3.1.5.11 Filesize</h4>
<p>
Only