Projet

Général

Profil

Paste
Télécharger (351 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / libraries / iCalcreator-2.22.1 / docs / using.html @ 99781f3b

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
2
<html>
3
<head>
4
<title>iCalcreator 2.22 manual</title>
5
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
6
<meta name="author"      content="Kjell-Inge Gustafsson, kigkonsult, All rights reserved">
7
<meta name="copyright"   content="2007-2015 Kjell-Inge Gustafsson, kigkonsult">
8
<meta name="keywords"    content="ical, calendar, calender, xcal, xml, icalender, rfc2445, rfc5545, vcalender, php, create">
9
<meta name="description" content="using iCalcreator v2.22">
10
<style type="text/css">
11
* {
12
  FONT-FAMILY     : "Bitstream Vera Sans", Helvetica, "Lucida Grande","Lucida Sans Unicode", Lucida, Arial, Geneva, sans-serif;
13
  BACKGROUND-COLOR: white;
14
  COLOR           : black;
15
  FONT-SIZE       : small;
16
}
17
body {
18
  MARGIN-LEFT     : 10px;
19
  WIDTH           : 750px;
20
}
21
a.ref {
22
  BACKGROUND-COLOR: inherit;
23
  FONT-SIZE       : 8pt;
24
  LETTER-SPACING  : 0.1em;
25
}
26
h1 {
27
  BACKGROUND-COLOR: silver;
28
  BORDER          : thin solid black;
29
  FONT-SIZE       : x-large;
30
  FONT-WEIGHT     : bold;
31
  DISPLAY         : block;
32
}
33
h2 {
34
  FONT-SIZE       : large;
35
}
36
h3 {
37
  FONT-SIZE       : medium;
38
}
39
h4 {
40
  FONT-SIZE       : small;
41
  FONT-WEIGHT     : bold;
42
}
43
h5 {
44
  FONT-SIZE       : small;
45
  FONT-WEIGHT     : normal;
46
  TEXT-DECORATION : underline;
47
}
48
table {
49
  border-collapse : collapse;
50
  width           : 100%;
51
}
52
.bb {
53
  BORDER-BOTTOM   : gray dotted thin;
54
}
55
.blb {
56
  BORDER-LEFT     : gray dotted thin;
57
  BORDER-BOTTOM   : gray dotted thin;
58
  TEXT-ALIGN      : center;
59
}
60
.bl {
61
  BORDER-LEFT     : gray dotted thin;
62
}
63
.center {
64
  TEXT-ALIGN      : center;
65
}
66
p.comment {
67
  FONT-FAMILY     : monospace;
68
  FONT-SIZE       : 9pt;
69
  FONT-WEIGHT     : 500;
70
  WHITE-SPACE     : pre-wrap;      /* css-3 */
71
  WHITE-SPACE     : -moz-pre-wrap; /* Mozilla, since 1999 */
72
  WHITE-SPACE     : -pre-wrap;     /* Opera 4-6 */
73
  WHITE-SPACE     : -o-pre-wrap;   /* Opera 7 */
74
  WORD-WRAP       : break-word;    /* Internet Explorer 5.5+ */
75
}
76
span.comment {
77
  BACKGROUND-COLOR: transparent;
78
  FONT-FAMILY     : Areal;
79
  FONT-SIZE       : 8pt;
80
  LETTER-SPACING  : 0.2em;
81
}
82
p.example {
83
  BACKGROUND-COLOR: #DCDCDC;
84
  font-family     : monospace;
85
  FONT-SIZE       : 9pt;
86
  LETTER-SPACING  : 0.1em;
87
  LINE-HEIGHT     : 1.5em;
88
  WHITE-SPACE     : pre-wrap;      /* css-3 */
89
  WHITE-SPACE     : -moz-pre-wrap; /* Mozilla, since 1999 */
90
  WHITE-SPACE     : -pre-wrap;     /* Opera 4-6 */
91
  WHITE-SPACE     : -o-pre-wrap;   /* Opera 7 */
92
  WORD-WRAP       : break-word;    /* Internet Explorer 5.5+ */
93
}
94
p.format {
95
  BORDER          : gray dotted thin;
96
  FONT-FAMILY     : Helvetica;
97
  FONT-SIZE       : 9pt;
98
  LETTER-SPACING  : 0.2em;
99
  LINE-HEIGHT     : 2em;
100
  WHITE-SPACE     : pre-wrap;      /* css-3 */
101
  WHITE-SPACE     : -moz-pre-wrap; /* Mozilla, since 1999 */
102
  WHITE-SPACE     : -pre-wrap;     /* Opera 4-6 */
103
  WHITE-SPACE     : -o-pre-wrap;   /* Opera 7 */
104
  WORD-WRAP       : break-word;    /* Internet Explorer 5.5+ */
105
}
106
.header {
107
  BACKGROUND-COLOR: silver;
108
  BORDER          : thin solid black;
109
  FONT-SIZE       : xx-large;
110
}
111
p.label {
112
  FONT-FAMILY     : Arial;
113
  FONT-WEIGHT     : bold;
114
  LETTER-SPACING  : 0.1em;
115
}
116
p.quotes {
117
  BACKGROUND-COLOR: #F5F5F5;
118
  FONT-FAMILY     : Arial;
119
  FONT-STYLE      : italic;
120
  LETTER-SPACING  : 0.1em;
121
}
122
sup {
123
  BACKGROUND-COLOR: transparent;
124
  FONT-SIZE       : x-small;
125
  FONT-WEIGHT     : bold;
126
  VERTICAL-ALIGN  : super;
127
}
128
.ref {
129
  BACKGROUND-COLOR: transparent;
130
  FONT-SIZE       : 8pt;
131
  LETTER-SPACING  : 0.1em;
132
}
133
.top {
134
  VERTICAL-ALIGN  : top;
135
}
136
</style>
137
</head>
138
<body>
139
<a name="top"></a>
140
<p class="header">iCalcreator v2.22</p>
141
<p>
142
iCalcreator v2.22<br>
143
Copyright &copy; 2007-2015 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
144
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
145
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
146
</p>
147

    
148
<h2>Preface</h2>
149
<p>
150
This document describes usage of iCalcreator, a <em>PHP</em> software implementation of standards <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a> to manage iCal formatted files.
151
</p>
152
<p>
153
This document is provided by kigkonsult for informational purposes
154
and is provided on an &quot;as is&quot; basis without any warranties expressed or implied.
155
</p>
156
<p>
157
Information in this document is subject to change without notice and does
158
not represent a commitment on the part of kigkonsult.
159
The software described in this document is provided under a <a href="#Copyright_and_Licence">license agreement</a>.
160
The software may be used only in accordance with the terms of that <a href="#Copyright_and_Licence">license agreement</a>.
161
It is against the law to copy or use the software except as specifically allowed in the <a href="#Copyright_and_Licence">license agreement</a>.
162
</p>
163
<p>
164
It is the users responsibility to ensure the suitability of the software before using it.
165
In no circumstances will kigkonsult be responsible for
166
the use of the software's outcomes or results or any loss
167
or damage of data or programs as a result of using the software.
168
The use of the software implies acceptance of these terms.
169
</p>
170
<p>
171
This document makes previous versions obsolete.
172
</p>
173
<a href="#INDEX">[index]</a></a>
174

    
175
<a name="INTRO"></a><h1>1 INTRO</h1>
176
<p>
177
iCalcreator is a <em>PHP</em> class package managing iCal files, supporting (non-)<strong>calendar</strong>
178
systems and applications to process and communicate <strong>calendar</strong> information like
179
events, agendas, tasks, reports, totos and journaling information.
180
</p>
181
<p>
182
The iCal standards are <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a>.</p>
183
<p>
184
iCalcreator features create, parse, edit and select <strong>calendar</strong> and <strong>calendar</strong> components.
185
</p>
186
<p>
187
The iCalcreator package, based of a <strong>calendar</strong> / components classes and with support of function classes and helper functions,
188
are <strong>calendar</strong> component property oriented.
189
For iCalcreator 2.22 version (and later), <em>PHP</em> version &gt;= 5.3 is required.
190
</p>
191
<p>
192
More iCalcreator supplementary, &quot;howto&quot; and coding support information will be found at
193
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>.
194
A strong recommendation is to have this document open in parallell when exploiting the link.
195
</p>
196
<p>
197
iCalcreator may support hiphop if the HDF AllDynamic option is enabled (the helper <a href="#iCal2XML">iCal2XML</a> function is excluded).
198
</p>
199
<br>
200
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
201

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

    
204
<h4>iCal</h4>
205
The <strong>iCalendar</strong> format, <strong>iCal</strong>, as described in
206
<dl>
207
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a>
208
<dd>&quot;Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)&quot;
209
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
210
<dd>&quot;iCalendar Transport-Independent Interoperability Protocol (iTIP)&quot;<br>Scheduling Events, BusyTime, To-dos and Journal Entries
211
</dl>
212
<p class="quotes">. ..allows for the capture and exchange of information normally stored
213
within a calendaring and scheduling application.</p>
214
and
215
<p class="quotes">. ..is an exchange format between applications or systems.</p>
216
<p><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a> and
217
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
218
obsoletes, respectively,
219
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="Download RFC2445 in text format" target="_blank">rfc2445</a> and
220
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2446" title="Download RFC2446 in text format" target="_blank">rfc2446</a>.
221
</p>
222
<p>
223
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!
224
Knowledge of <strong>calendar</strong> protocol rfc5545/rfc5546 is to recommend.
225
</p>
226
<p>
227
Any references to rfc2445, below, corresponds to rfc5545.
228
</p>
229

    
230
<h4>xCal</h4>
231
<p>iCalcreator also supports xCal (iCal xml) rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;, to be downloaded from</p>
232
<dl>
233
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc6321" title="Download RFC6321 in text format" target="_blank">rfc6321</a>
234
<dd>&quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;
235
</dl>
236
<p>
237
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>.
238
</p>
239
<p>
240
The older xCal format, as defined in &quot;http://www.ietf.org/internet-drafts/draft-ietf-calsch-many-xcal-01.txt&quot;
241
(but no longer found), still works in this version but will not be maintaned and will be removed in future versions.
242
</p>
243
<br>
244
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
245

    
246

    
247
<a name="This_manual"></a><h2>1.2 This manual</h2>
248
<p>This style is used for text.</p>
249
<p class="format">This style is used for formats.</p>
250
<p class="example">&lt;?php
251
.. .
252
This style is used for <em>PHP</em> coding examples.
253
<span class="comment"> // this style is used for coding comments.</span>
254
.. .
255
</p>
256
<p class="comment">This style is used for content details.</p>
257
<p class="quotes">This style is used for RFC2445/5545 quotes.</p>
258

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

    
262

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

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

    
277
<p>The release plan is based on yearly releases with exception of emergency releases.</p>
278

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

    
282
<a name="Support"></a><h2>1.4 Support</h2>
283
<p>
284
Use the kigkonsult.se standard support <a href="http://kigkonsult.se/support/index.php" title="kigkonsult.se/support" target="_blank">page</a>
285
exploring iCalcreator use and iCal issues.
286
</p>
287
<p>
288
Support and development is now focused on iCalcreator (Pro) 3.x versions, which, in turn, will affect future releases
289
of iCalcreator 2.x.
290
</p>
291
<p>
292
Use the contact <a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se/contact" target="_blank">page</a>
293
for queries, improvement/development issues or professional support and development.
294
Please note that paid support or consulting service has the highest priority.
295
</p>
296
<p>
297
kigkonsult offer professional services for software support, design and new/re-development, customizations and adaptations
298
of <em>PHP</em>/<em>MySQL</em> solutions with focus on software lifecycle management, including long term utility, reliability and maintainability.
299
</p>
300

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

    
304

    
305
<a name="Donate"></a><h2>1.5 Donate</h2>
306
<p>
307
You can show your appreciation for our free software,
308
and can support future development by making a donation to the kigkonsult project iCalcreator.
309
</p>
310
<p>
311
Make a donation of any size by clicking <a href="http://kigkonsult.se/contact/index.php#Donate" title="Donate" target="_blank">here</a>.
312
Thanks in advance!
313
</p>
314

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

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

    
320
<p>
321
Unpack to any folder<br>
322
- add this folder to your include-path<br>
323
- or unpack to your application-(include)-folder
324
</p>
325
<p>Add</p>
326
<p class="format">require_once &quot;[path/]iCalcreator-&lt;version&gt;/iCalcreator.php&quot;;</p>
327
<p>to your <em>PHP</em>-script.
328
The iCalcreator invoke has changed since previous version!
329
You may also need to set the default timezone.
330
</p>
331
<p>
332
</p>
333
<p>
334
Creating a new iCalcreator object instance/component instance, review <a href="#iCalcreator_configuration_methods">config</a> settings.
335
</p>
336

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

    
340

    
341
<a name="Additional_Descriptors"></a><h2>1.7 Additional Descriptors</h2>
342
<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>)
343
may be required when importing iCal files into some calendaring software (MS etc.):</p>
344
<dl>
345
<dt>on <strong>calendar</strong> level
346
<dd><a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
347
<dd><a href="#X-PROPERTY">X-WR-CALNAME</a> x-property
348
<dd><a href="#X-PROPERTY">X-WR-CALDESC</a> x-property
349
<dd><a href="#X-PROPERTY">X-WR-RELCALID</a> x-property <span class="comment">(Read more info about <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier" title="Universally Unique Identifier">UUID</a>.)</span>
350
<dd><a href="#X-PROPERTY">X-WR-TIMEZONE</a> x-property
351
<dt>on component level
352
<dd><a href="#DTSTAMP">DTSTAMP</a> property (in iCalcreator created automatically, if not set)
353
<dd><a href="#UID">UID</a> property (in iCalcreator created automatically, if not set)
354
<dt>on component level in a <a href="#VTIMEZONE">vtimezone</a> component
355
<dd><a href="#X-PROPERTY">X-LIC-LOCATION</a> x-property
356
</dl>
357
<p class="label">Example</p>
358
<p>
359
A strong recommendation is also to set config <a href="#Unique_id">unique_id</a>, creating a new vcalendar/component instance,
360
to ensure accurate setting of all components <a href="#UID">UID</a> property, especially before <a href="#parse_merge">parse</a>.
361
Also setting of config timezone (&quot;TZID&quot; and &quot;X-WR-TIMEZONE&quot; below) is to recommend.
362
</p>
363
<p class="example">&lt;?php
364
.. .
365
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
366
$vcalendar = new vcalendar( $config );
367
$vcalendar-&gt;setProperty( &quot;method&quot;,        &quot;PUBLISH&quot; )
368
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;,  &quot;Calendar Sample&quot; );
369
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;,  &quot;Calendar Description&quot; );
370
$uuid      = &quot;3E26604A-50F4-4449-8B3E-E4F4932D05B5&quot;;
371
$vcalendar-&gt;setProperty( &quot;X-WR-RELCALID&quot;, $uuid );
372
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
373
.. .
374
</p>
375

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

    
379

    
380
<a name="Addendum"></a><h2>1.8 Addendum</h2>
381
<p>
382
For iCalcreator usage, coding samples and tests, visit the public kigkonsult.se
383
<a title="iCalcreator coding and test pages" href="http://kigkonsult.se/test/index.php" target="_blank">test</a> resource.
384
</p>
385
<dl>
386
<dt>Examples how to employ iCalcreator in software development
387
<dd><a title="dbiCal" href="http://kigkonsult.se/dbiCal/index.php" target="_blank">dbiCal</a>, an iCal file <i>PHP</i> database backend solution.
388
<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>
389
<dd><a title="tinycal" href="http://kigkonsult.se/tinycal/index.php" target="_blank">tinycal</a>, <strong>calendar</strong>-in-a-box.
390
</dl>
391
<p>
392
There are free iCal/xCal icons (use as buttons on a web page?) to download
393
<a href="http://kigkonsult.se/downloads/i.php?i=all" title="iCal images" target="_blank">here</a>.
394
</p>
395
<p>
396
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
397
coding standard, the following, incomplete, list is a good start;
398
</p>
399
<dl>
400
<dd><a href="http://www.php-fig.org/psr/psr-1/" target="_blank">PHP Framework Interop Group Basic Coding Standard</a>
401
<!-- dd><a href="http://www.dagbladet.no/development/phpcodingstandard/" target="_blank">http://www.dagbladet.no/development/phpcodingstandard/</a -->
402
<!-- dd><a href="http://ez.no/ezpublish/documentation/development/standards/php" target="_blank">http://ez.no/ezpublish/documentation/development/standards/php</a> -->
403
<!-- <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> -->
404
<dd><a href="http://pear.php.net/manual/en/standards.php" target="_blank"> pear Coding standards</a>
405
<dd><a href="http://make.wordpress.org/core/handbook/coding-standards/php/" target="_blank">WordPress PHP Coding Standards</a>
406
<dd><a href="http://framework.zend.com/manual/1.10/en/coding-standard.html" target="_blank">Zend Framework Coding Standard</a>
407
</dl>
408

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

    
412

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

    
415
<a href="#INTRO">1 INTRO</a><br>
416
<br>
417
<a href="#Standards">1.1 Standards</a><br>
418
<a href="#This_manual">1.2 This manual</a><br>
419
<a href="#Versioning">1.3 Versioning</a><br>
420
<a href="#Support">1.4 Support</a><br>
421
<a href="#Donate">1.5 Donate</a><br>
422
<a href="#INSTALL">1.6 Install</a><br>
423
<a href="#Additional_Descriptors">1.7 Additional_Descriptors</a><br>
424
<a href="#Addendum">1.8 Addendum</a><br>
425
<a href="#INDEX">1.9 INDEX</a><br>
426
<br>
427
<a href="#Calendar_Component_list">2 Calendar Component list</a><br>
428
<br>
429
<a href="#VCALENDAR">2.1  VCALENDAR</a><br>
430
<a href="#VEVENT">2.2  VEVENT</a><br>
431
<a href="#VTODO">2.3  VTODO</a><br>
432
<a href="#VJOURNAL">2.4  VJOURNAL</a><br>
433
<a href="#VFREEBUSY">2.5  VFREEBUSY</a><br>
434
<a href="#VALARM">2.6  VALARM</a><br>
435
<a href="#VTIMEZONE">2.7  VTIMEZONE</a><br>
436
<a href="#CalProps">2.8  Component Properties</a><br>
437
<br>
438
<a href="#Function_list">3 Function list</a><br>
439
<br>
440
<a href="#iCalcreator_object_methods">3.1 iCalcreator object methods</a><br>
441
<br>
442
<a href="#Calendar_object_constructors">3.1.1 Constructors</a><br>
443
<a href="#vcalendar_constr">3.1.1.1 vcalendar</a><br>
444
<a href="#vevent_constr">3.1.1.2 vevent</a><br>
445
<a href="#vtodo_constr">3.1.1.3 vtodo</a><br>
446
<a href="#vjournal_constr">3.1.1.4 vjournal</a><br>
447
<a href="#vfreebusy_constr">3.1.1.5 vfreebusy</a><br>
448
<a href="#valarm_constr">3.1.1.6 valarm</a><br>
449
<a href="#vtimezone_constr">3.1.1.7 vtimezone</a><br>
450
<a href="#standard_constr">3.1.1.8 standard</a><br>
451
<a href="#daylight_constr">3.1.1.9 daylight</a><br>
452
<br>
453
<a href="#iCalcreator_object_property_methods">3.1.2 iCalcreator object property methods</a><br>
454
<a href="#deleteProperty">3.1.2.1 deleteProperty</a><br>
455
<a href="#getProperty">3.1.2.2 getProperty</a><br>
456
<a href="#setProperty">3.1.2.3 setProperty</a><br>
457
<a href="#CALSCALE">3.1.2.4 CALSCALE</a><br>
458
<a href="#METHOD">3.1.2.5 METHOD</a><br>
459
<a href="#VERSION">3.1.2.6 VERSION</a><br>
460
<a href="#X-PROPERTY">3.1.2.7 X-PROPERTY</a><br>
461
<br>
462
<a href="#iCalcreator_component_object_methods">3.1.3 iCalcreator component object methods</a><br>
463
<a href="#deleteComponent">3.1.3.1 deleteComponent</a><br>
464
<a href="#getComponent">3.1.3.2 getComponent</a><br>
465
<a href="#newComponent">3.1.3.3 newComponent</a><br>
466
<a href="#replaceComponent">3.1.3.4 replaceComponent</a><br>
467
<a href="#selectComponents">3.1.3.5 selectComponents</a><br>
468
<a href="#setComponent">3.1.3.6 setComponent</a><br>
469
<br>
470
<a href="#iCalcreator_calendar_methods">3.1.4 iCalcreator calendar methods</a><br>
471
<a href="#parse_merge">3.1.4.1 parse and merge</a><br>
472
<a href="#createCalendar">3.1.4.2 createCalendar</a><br>
473
<a href="#returnCalendar">3.1.4.3 returnCalendar</a><br>
474
<a href="#saveCalendar">3.1.4.4 saveCalendar</a><br>
475
<a href="#sort">3.1.4.5 sort</a><br>
476
<a href="#useCachedCalendar">3.1.4.6 useCachedCalendar</a><br>
477
<a href="#iCalcreatorVersion">3.1.4.7 iCalcreatorVersion</a><br>
478
<br>
479
<a href="#iCalcreator_configuration_methods">3.1.5 iCalcreator configuration methods</a><br>
480
<a href="#configKeys">3.1.5.1 configuration keys</a><br>
481
<a href="#getConfig">3.1.5.2 getConfig</a><br>
482
<a href="#initConfig">3.1.5.3 calendar/component initialization</a><br>
483
<a href="#setConfig">3.1.5.4 setConfig</a><br>
484
<a href="#allowEmpty">3.1.5.5 Allow empty components</a><br>
485
<a href="#Compsinfo">3.1.5.6 Component information</a><br>
486
<a href="#Delimiter">3.1.5.7 Delimiter</a><br>
487
<a href="#Directory">3.1.5.8 Directory</a><br>
488
<a href="#Dirfile">3.1.5.9 Dirfile</a><br>
489
<a href="#Fileinfo">3.1.5.10 Fileinfo</a><br>
490
<a href="#Filename">3.1.5.11 Filename</a><br>
491
<a href="#Filesize">3.1.5.12 Filesize</a><br>
492
<a href="#Format">3.1.5.13 Format</a><br>
493
<a href="#Language">3.1.5.14 Language</a><br>
494
<a href="#NewlineChar">3.1.5.15 NewlineChar</a><br>
495
<a href="#setPropertyNames">3.1.5.16 setPropertyNames</a><br>
496
<a href="#dTZID">3.1.5.17 TZID</a><br>
497
<a href="#Unique_id">3.1.5.18 Unique_id</a><br>
498
<a href="#configURL">3.1.5.19 URL</a><br>
499
<br>
500
<a href="#Calendar_component_object_property_function_list">3.2 Calendar component property method list</a><br>
501
<br>
502
<a href="#deleteProperty_PROP">3.2.1 deleteProperty</a><br>
503
<a href="#getProperty_PROP">3.2.2 getProperty</a><br>
504
<a href="#parse">3.2.3 parse</a><br>
505
<a href="#setProperty_PROP">3.2.4 setProperty</a><br>
506
<dl>
507
<dt>Ascending property order
508
<dd><a href="#ACTION">3.2.5 ACTION</a>
509
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
510
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
511
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
512
<dd><a href="#CLASS">3.2.9 CLASS</a>
513
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
514
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
515
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
516
<dd><a href="#CREATED">3.2.13 CREATED</a>
517
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
518
<dd><a href="#DTEND">3.2.15 DTEND</a>
519
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
520
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
521
<dd><a href="#DUE">3.2.18 DUE</a>
522
<dd><a href="#DURATION">3.2.19 DURATION</a>
523
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
524
<dd><a href="#EXRULE">3.2.21 EXRULE</a>
525
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
526
<dd><a href="#GEO">3.2.23 GEO</a>
527
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
528
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
529
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
530
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
531
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
532
<dd><a href="#RDATE">3.2.29 RDATE</a>
533
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
534
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
535
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
536
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
537
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
538
<dd><a href="#RRULE">3.2.35 RRULE</a>
539
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
540
<dd><a href="#STATUS">3.2.37 STATUS</a>
541
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
542
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
543
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
544
<dd><a href="#TZID">3.2.41 TZID</a>
545
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
546
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
547
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
548
<dd><a href="#TZURL">3.2.45 TZURL</a>
549
<dd><a href="#UID">3.2.46 UID</a>
550
<dd><a href="#URL">3.2.47 URL</a>
551
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
552
<dt>Descriptive Component Properties
553
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
554
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
555
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
556
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
557
<dd><a href="#GEO">3.2.23 GEO</a>
558
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
559
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
560
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
561
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
562
<dd><a href="#STATUS">3.2.37 STATUS</a>
563
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
564
<dt>Date and Time Component Properties
565
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
566
<dd><a href="#DTEND">3.2.15 DTEND</a>
567
<dd><a href="#DUE">3.2.18 DUE</a>
568
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
569
<dd><a href="#DURATION">3.2.19 DURATION</a>
570
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
571
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
572
<dt>Time Zone Component Properties
573
<dd><a href="#TZID">3.2.41 TZID</a>
574
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
575
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
576
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
577
<dd><a href="#TZURL">3.2.45 TZURL</a>
578
<dt>Relationship Component Properties
579
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
580
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
581
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
582
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
583
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
584
<dd><a href="#URL">3.2.47 URL</a>
585
<dd><a href="#UID">3.2.46 UID</a>
586
<dt>Recurrence Component Properties
587
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
588
<dd><a href="#RDATE">3.2.29 RDATE</a>
589
<dd><a href="#RRULE">3.2.35 RRULE</a>
590
<dt>Alarm Component Properties
591
<dd><a href="#ACTION">3.2.5 ACTION</a>
592
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
593
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
594
<dt>Change Management Component Properties
595
<dd><a href="#CREATED">3.2.13 CREATED</a>
596
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
597
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
598
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
599
<dt>Miscellaneous Component Properties
600
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
601
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
602
</dl>
603
<a href="#iCalcreator_component_configuration_methods">3.3 iCalcreator Component configuration methods</a><br>
604
<br>
605
<a href="#Language_PROP">3.3.1 Language</a><br>
606
<br>
607
<a href="#iCalcreator_component_object_misc_methods">3.4 iCalcreator component object misc. methods</a><br>
608
<br>
609
<a href="#deleteComponent_PROP">3.4.1 deleteComponent</a><br>
610
<a href="#getComponent_PROP">3.4.2 getComponent</a><br>
611
<a href="#newComponent_PROP">3.4.3 newComponent</a><br>
612
<a href="#setComponent_PROP">3.4.4 setComponent</a><br>
613
<br>
614
<a href="#iCalUtilityFunctions">4 iCalUtilityFunctions</a><br>
615
<br>
616
<a href="#convEolChar">4.1 convEolChar</a><br>
617
<a href="#createTimezone">4.2 createTimezone</a><br>
618
<a href="#ms2phpTZ">4.3 ms2phpTZ</a><br>
619
<a href="#transformDateTime">4.4 transformDateTime</a><br>
620
<a href="#mddtuf">4.5 Misc. date/duration/timestamp util. functions</a><br>
621
<br>
622
<a href="#helperFunctions">5 Helper functions</a><br>
623
<br>
624
<a href="#XMLhelpers">5.1 iCal and XML helper functions</a><br>
625
<br>
626
<a href="#iCal2XML">5.1.1 iCal2XML</a><br>
627
<a href="#XML2iCal">5.1.2 XML2iCal</a><br>
628
<br>
629
<a href="#vCardhelpers">5.2 iCal and vCard helper functions</a><br>
630
<br>
631
<a href="#iCal2vCard">5.2.1 iCal2vCard</a><br>
632
<a href="#iCal2vCards">5.2.2 iCal2vCards</a><br>
633
<br>
634
<br>
635
<a href="#TZhelpers">5.3 Time zone helper functions</a><br>
636
<br>
637
<a href="#getTzOffsetForDate">5.3.1 getTzOffsetForDate</a><br>
638
<a href="#getTimezonesAsDateArrays">5.3.2 getTimezonesAsDateArrays</a><br>
639
<br>
640
<a href="#Copyright_and_Licence">6 COPYRIGHT AND LICENSE</a><br>
641
<br>
642
<a href="#Copyright">6.1 Copyright</a><br>
643
<a href="#Licence">6.2 License</a><br>
644
<br>
645
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
646

    
647
<a name="Calendar_Component_list"></a><h1>2 Calendar Component list</h1>
648
<p>
649
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>)!
650
(Described in iCal output format, content corresponds to xCal format.)
651
</p>
652
<a name="VCALENDAR"></a><h2>2.1  VCALENDAR</h2>
653
<p class="center">icalobject = 1*(&quot;BEGIN&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF</p>
654
<p class="center">icalbody</p>
655
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF)</p>
656
<p>icalbody = calprops component</p>
657
<p>calprops = 2*(</p>
658
<p class="center">&quot;prodid&quot; and &quot;version&quot; are both REQUIRED, but MUST NOT occur more than once
659
<p class="center">prodid / <a href="#VERSION">version</a> /</p>
660
<p class="center">&quot;calscale&quot;and &quot;method&quot;are optional, but MUST NOT occur more than once</p>
661
<p class="center"><a href="#CALSCALE">calscale</a> / <a href="#METHOD">method</a> /</p>
662
<p class="center"><a href="#X-PROPERTY">x-prop</a></p>
663
<p>)</p>
664
<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>
665
<p class="center">iana-comp  = &quot;BEGIN&quot; &quot;:&quot; iana-token CRLF</p>
666
<p class="center">1*contentline</p>
667
<p class="center">&quot;END&quot; &quot;:&quot; iana-token CRLF</p>
668
<p class="center">x-comp     = &quot;BEGIN&quot; &quot;:&quot; x-name CRLF</p>
669
<p class="center">1*contentline</p>
670
<p class="center">&quot;END&quot; &quot;:&quot; x-name CRLF</p>
671
<p>*) <span class="comment">not supported by iCalcreator</span></p>
672

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

    
675
<a name="VEVENT"></a><h2>2.2  VEVENT</h2>
676
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
677
<p class="center">eventprop *alarmc</p>
678
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
679
<p>eventprop = *(</p>
680
<p class="center">the following are optional,but MUST NOT occur more than once</p>
681
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> /</p>
682
<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>
683
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> / </p>
684
<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>
685
<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>
686
<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>
687
<p class="center"><a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> /</p>
688
<p class="center">the following are optional, and MAY occur more than once</p>
689
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
690
<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>
691
<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>
692
<p>)</p>
693

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

    
696
<a name="VTODO"></a><h2>2.3  VTODO</h2>
697
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
698
<p class="center">todoprop *alarmc</p>
699
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
700
<p>todoprop   = *(</p>
701
<p class="center">the following are optional, but MUST NOT occur more than once</p>
702
<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>
703
<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>
704
<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>
705
<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>
706
<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>
707
<p class="center"><a href="#DUE">due</a> / <a href="#DURATION">duration</a> /</p>
708
<p class="center">the following are optional,and MAY occur more than once</p>
709
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
710
<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>
711
<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>
712
<p>)</p>
713

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

    
716
<a name="VJOURNAL"></a><h2>2.4  VJOURNAL</h2>
717
<p class="center">journalc   = &quot;BEGIN&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
718
<p class="center">jourprop</p>
719
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
720
<p>jourprop   = *(</p>
721
<p class="center">the following are optional, but MUST NOT occur more than once</p>
722
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> / </p>
723
<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>
724
<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>
725
<p class="center">the following are optional,and MAY occur more than once</p>
726
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> /</p>
727
<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>
728
<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>
729
<p>)</p>
730

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

    
733
<a name="VFREEBUSY"></a><h2>2.5  VFREEBUSY</h2>
734
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
735
<p class="center">fbprop</p>
736
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
737
<p>fbprop     = *(</p>
738
<p class="center">the following are optional, but MUST NOT occur more than once</p>
739
<p class="center"><a href="#CONTACT">contact</a> / <a href="#DTSTART">dtstart</a> / <a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> / </p>
740
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#ORGANIZER">organizer</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / </p>
741
<p class="center">the following are optional,and MAY occur more than once</p>
742
<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>
743
<p>)</p>
744

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

    
747
<a name="VALARM"></a><h2>2.6  VALARM</h2>
748
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p>
749
<p class="center">(audioprop / dispprop / emailprop / procprop)</p>
750
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p>
751
<p>audioprop  = 2*(</p>
752
<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>
753
<p class="center"><a href="#ACTION">action</a> / <a href="#TRIGGER">trigger</a> /</p>
754
<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>
755
<p class="center">but if one occurs, so MUST the other</p>
756
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
757
<p class="center">the following is optional, but MUST NOT occur more than once</p>
758
<p class="center"><a href="#ATTACH">attach</a> / </p>
759
<p class="center">the following is optional, and MAY occur more than once</p>
760
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
761
<p>)</p>
762

    
763
<p>dispprop   = 3*(</p>
764
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
765
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> /</p>
766
<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>
767
<p class="center">but if one occurs, so MUST the other</p>
768
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
769
<p class="center">the following is optional, and MAY occur more than once</p>
770
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
771
<p>)</p>
772

    
773
<p>emailprop  = 5*(</p>
774
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
775
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> / <a href="#SUMMARY">summary</a></p>
776
<p class="center">the following is REQUIRED, and MAY occur more than once</p>
777
<p class="center"><a href="#ATTENDEE">attendee</a> / </p>
778
<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>
779
<p class="center">but if one occurs, so MUST the other</p>
780
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
781
<p class="center">the following are optional, and MAY occur more than once</p>
782
<p class="center"><a href="#ATTACH">attach</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
783
<p>)</p>
784

    
785
<p>procprop   = 3*(</p>
786
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
787
<p class="center"><a href="#ACTION">action</a> / <a href="#ATTACH">attach</a> / <a href="#TRIGGER">trigger</a> /</p>
788
<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>
789
<p class="center">but if one occurs, so MUST the other</p>
790
<p class="center"><a href="#DURATION">duration</a> /
791
<a href="#REPEAT">repeat</a> /</p>
792
<p class="center">&quot;<a href="#DESCRIPTION">description</a>&quot; is optional, and MUST NOT occur more than once</p>
793
<p class="center"><a href="#DESCRIPTION">description</a> / </p>
794
<p class="center">the following is optional, and MAY occur more than once</p>
795
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
796
<p>)</p>
797

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

    
800
<a name="VTIMEZONE"></a><h2>2.7  VTIMEZONE</h2>
801
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
802
<p>2*(</p>
803
<p class="center">&quot;<a href="#TZID">tzid</a>&quot; is required, but MUST NOT occur more than once</p>
804
<p class="center"><a href="#TZID">tzid</a> / </p>
805
<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>
806
<p class="center"><a href="#LAST-MODIFIED">last-mod</a> / <a href="#TZURL">tzurl</a> /</p>
807
<p class="center">one of &quot;standardc&quot; or &quot;daylightc&quot; MUST occur and each MAY occur more than once.</p>
808
<p class="center">standardc / daylightc /</p>
809
<p class="center">the following is optional, and MAY occur more than once</p>
810
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
811
<p>)</p>
812
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
813
<p class="center">standardc  = &quot;BEGIN&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
814
<p class="center">tzprop</p>
815
<p class="center">&quot;END&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
816
<p class="center">daylightc  = &quot;BEGIN&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>
817
<p class="center">tzprop</p>
818
<p class="center">&quot;END&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>
819

    
820
<p>tzprop     = 3*(</p>
821
<p class="center">the following are each REQUIRED, but MUST NOT occur more than once</p>
822
<p class="center"><a href="#DTSTART">dtstart</a> / <a href="#TZOFFSETTO">tzoffsetto</a> / <a href="#TZOFFSETFROM">tzoffsetfrom</a> /</p>
823
<p class="center">the following are optional, and MAY occur more than once</p>
824
<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>
825
<p>)</p>
826

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

    
829
<a name="CalProps"></a><h2>2.8  Component Properties</h2>
830
<p>
831
A comprehensive table showing relation between <strong>calendar</strong> components and properties.
832
<a href="#VTIMEZONE">vtimezone</a> properties are not included.
833
</p>
834
<table>
835
<tr>
836
<td>0-1</td>
837
<td colspan="8">OPTIONAL property, MUST NOT occur more than once.</td>
838
</tr>
839
<tr>
840
<td>0-m</td>
841
<td colspan="8">OPTIONAL property, MAY occur more than once.</td>
842
</tr>
843
<tr>
844
<td>0&nbsp;/&nbsp;1=1</td>
845
<td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST the other</td>
846
</tr>
847
<tr>
848
<td>0*1</td>
849
<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>
850
</tr>
851
<tr>
852
<td>1-m</td>
853
<td colspan="8">REQUIRED property, MAY occur more than once.</td>
854
</tr>
855
<tr>
856
<td>1</td>
857
<td colspan="8">REQUIRED property, MUST NOT occur more than once.</td>
858
</tr>
859
<tr>
860
<td colspan="9">&nbsp;</td>
861
</tr>
862
<tr>
863
<td>&nbsp;</td>
864
<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>
865
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VTODO">v<br>t<br>o<br>d<br>o</a></td>
866
<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>
867
<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>
868
<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>
869
</tr>
870
<tr>
871
<td class="bb">&nbsp;</td>
872
<td class="bl bb center ref"><br><br><br><br>a<br>u<br>d<br>i<br>o</td>
873
<td class="bl bb center ref"><br><br>d<br>i<br>s<br>p<br>l<br>a<br>y</td>
874
<td class="bl bb center ref"><br><br><br><br>e<br>m<br>a<br>i<br>l</td>
875
<td class="bl bb center ref">p<br>r<br>o<br>c<br>e<br>d<br>u<br>r<br>e</td>
876
</tr>
877
<tr>
878
<td class="bb"><a class="ref" href="#ACTION">action</a></td>
879
<td class="blb">&nbsp;</td>
880
<td class="blb">&nbsp;</td>
881
<td class="blb">&nbsp;</td>
882
<td class="blb">&nbsp;</td>
883
<td class="blb">1</td>
884
<td class="blb">1</td>
885
<td class="blb">1</td>
886
<td class="blb">1</td>
887
</tr>
888
<tr>
889
<td class="bb"><a class="ref" href="#ATTACH">attach</a></td>
890
<td class="blb">0-m</td>
891
<td class="blb">0-m</td>
892
<td class="blb">0-m</td>
893
<td class="blb">&nbsp;</td>
894
<td class="blb">0-1</td>
895
<td class="blb">&nbsp;</td>
896
<td class="blb">0-m</td>
897
<td class="blb">1</td>
898
</tr>
899
<tr>
900
<td class="bb"><a class="ref" href="#ATTENDEE">attendee</a></td>
901
<td class="blb">0-m</td>
902
<td class="blb">0-m</td>
903
<td class="blb">0-m</td>
904
<td class="blb">0-m</td>
905
<td class="blb">&nbsp;</td>
906
<td class="blb">&nbsp;</td>
907
<td class="blb">1-m</td>
908
<td class="blb">&nbsp;</td>
909
</tr>
910
<tr>
911
<td class="bb"><a class="ref" href="#CATEGORIES">categories</a></td>
912
<td class="blb">0-m</td>
913
<td class="blb">0-m</td>
914
<td class="blb">0-m</td>
915
<td class="blb">&nbsp;</td>
916
<td class="blb">&nbsp;</td>
917
<td class="blb">&nbsp;</td>
918
<td class="blb">&nbsp;</td>
919
<td class="blb">&nbsp;</td>
920
</tr>
921
<tr>
922
<td class="bb"><a class="ref" href="#CLASS">class</a></td>
923
<td class="blb">0-1</td>
924
<td class="blb">0-1</td>
925
<td class="blb">0-1</td>
926
<td class="blb">&nbsp;</td>
927
<td class="blb">&nbsp;</td>
928
<td class="blb">&nbsp;</td>
929
<td class="blb">&nbsp;</td>
930
<td class="blb">&nbsp;</td>
931
</tr>
932
<tr>
933
<td class="bb"><a class="ref" href="#COMMENT">comment</a></td>
934
<td class="blb">0-m</td>
935
<td class="blb">0-m</td>
936
<td class="blb">0-m</td>
937
<td class="blb">0-m</td>
938
<td class="blb">&nbsp;</td>
939
<td class="blb">&nbsp;</td>
940
<td class="blb">&nbsp;</td>
941
<td class="blb">&nbsp;</td>
942
</tr>
943
<tr>
944
<td class="bb"><a class="ref" href="#COMPLETED">completed</a></td>
945
<td class="blb">&nbsp;</td>
946
<td class="blb">0-1</td>
947
<td class="blb">&nbsp;</td>
948
<td class="blb">&nbsp;</td>
949
<td class="blb">&nbsp;</td>
950
<td class="blb">&nbsp;</td>
951
<td class="blb">&nbsp;</td>
952
<td class="blb">&nbsp;</td>
953
</tr>
954
<tr>
955
<td class="bb"><a class="ref" href="#CONTACT">contact</a></td>
956
<td class="blb">0-m</td>
957
<td class="blb">0-m</td>
958
<td class="blb">0-m</td>
959
<td class="blb">0-1</td>
960
<td class="blb">&nbsp;</td>
961
<td class="blb">&nbsp;</td>
962
<td class="blb">&nbsp;</td>
963
<td class="blb">&nbsp;</td>
964
</tr>
965
<tr>
966
<td class="bb"><a class="ref" href="#CREATED">created</a></td>
967
<td class="blb">0-1</td>
968
<td class="blb">0-1</td>
969
<td class="blb">0-1</td>
970
<td class="blb">&nbsp;</td>
971
<td class="blb">&nbsp;</td>
972
<td class="blb">&nbsp;</td>
973
<td class="blb">&nbsp;</td>
974
<td class="blb">&nbsp;</td>
975
</tr>
976
<tr>
977
<td class="bb"><a class="ref" href="#DESCRIPTION">description</a></td>
978
<td class="blb">0-1</td>
979
<td class="blb">0-1</td>
980
<td class="blb">0-m</td>
981
<td class="blb">&nbsp;</td>
982
<td class="blb">&nbsp;</td>
983
<td class="blb">1</td>
984
<td class="blb">1</td>
985
<td class="blb">0-1</td>
986
</tr>
987
<tr>
988
<td class="bb"><a class="ref" href="#DTEND">dtend</a></td>
989
<td class="blb">0*1</td>
990
<td class="blb">&nbsp;</td>
991
<td class="blb">&nbsp;</td>
992
<td class="blb">0-1</td>
993
<td class="blb">&nbsp;</td>
994
<td class="blb">&nbsp;</td>
995
<td class="blb">&nbsp;</td>
996
<td class="blb">&nbsp;</td>
997
</tr>
998
<tr>
999
<td class="bb"><a class="ref" href="#DTSTAMP">dtstamp</a></td>
1000
<td class="blb">0-1</td>
1001
<td class="blb">0-1</td>
1002
<td class="blb">0-1</td>
1003
<td class="blb">0-1</td>
1004
<td class="blb">&nbsp;</td>
1005
<td class="blb">&nbsp;</td>
1006
<td class="blb">&nbsp;</td>
1007
<td class="blb">&nbsp;</td>
1008
</tr>
1009
<tr>
1010
<td class="bb"><a class="ref" href="#DTSTART">dtstart</a></td>
1011
<td class="blb">0-1</td>
1012
<td class="blb">0-1</td>
1013
<td class="blb">0-1</td>
1014
<td class="blb">0-1</td>
1015
<td class="blb">&nbsp;</td>
1016
<td class="blb">&nbsp;</td>
1017
<td class="blb">&nbsp;</td>
1018
<td class="blb">&nbsp;</td>
1019
</tr>
1020
<tr>
1021
<td class="bb"><a class="ref" href="#DUE">due</a></td>
1022
<td class="blb">&nbsp;</td>
1023
<td class="blb">0*1</td>
1024
<td class="blb">&nbsp;</td>
1025
<td class="blb">&nbsp;</td>
1026
<td class="blb">&nbsp;</td>
1027
<td class="blb">&nbsp;</td>
1028
<td class="blb">&nbsp;</td>
1029
<td class="blb">&nbsp;</td>
1030
</tr>
1031
<tr>
1032
<td class="bb"><a class="ref" href="#DURATION">duration</a></td>
1033
<td class="blb">0*1</td>
1034
<td class="blb">0*1</td>
1035
<td class="blb">&nbsp;</td>
1036
<td class="blb">0-1</td>
1037
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1038
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1039
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1040
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1041
</tr>
1042
<tr>
1043
<td class="bb"><a class="ref" href="#EXDATE">exdate</a></td>
1044
<td class="blb">0-m</td>
1045
<td class="blb">0-m</td>
1046
<td class="blb">0-m</td>
1047
<td class="blb">&nbsp;</td>
1048
<td class="blb">&nbsp;</td>
1049
<td class="blb">&nbsp;</td>
1050
<td class="blb">&nbsp;</td>
1051
<td class="blb">&nbsp;</td>
1052
</tr>
1053
<tr>
1054
<td class="bb"><a class="ref" href="#EXRULE">exrule</a></td>
1055
<td class="blb">0-m</td>
1056
<td class="blb">0-m</td>
1057
<td class="blb">0-m</td>
1058
<td class="blb">&nbsp;</td>
1059
<td class="blb">&nbsp;</td>
1060
<td class="blb">&nbsp;</td>
1061
<td class="blb">&nbsp;</td>
1062
<td class="blb">&nbsp;</td>
1063
</tr>
1064
<tr>
1065
<td class="bb"><a class="ref" href="#FREEBUSY_PROP">freebusy</a></td>
1066
<td class="blb">&nbsp;</td>
1067
<td class="blb">&nbsp;</td>
1068
<td class="blb">&nbsp;</td>
1069
<td class="blb">0-m</td>
1070
<td class="blb">&nbsp;</td>
1071
<td class="blb">&nbsp;</td>
1072
<td class="blb">&nbsp;</td>
1073
<td class="blb">&nbsp;</td>
1074
</tr>
1075
<tr>
1076
<td class="bb"><a class="ref" href="#GEO">geo</a></td>
1077
<td class="blb">0-1</td>
1078
<td class="blb">0-1</td>
1079
<td class="blb">&nbsp;</td>
1080
<td class="blb">&nbsp;</td>
1081
<td class="blb">&nbsp;</td>
1082
<td class="blb">&nbsp;</td>
1083
<td class="blb">&nbsp;</td>
1084
<td class="blb">&nbsp;</td>
1085
</tr>
1086
<tr>
1087
<td class="bb"><a class="ref" href="#LAST-MODIFIED">last-mod</a></td>
1088
<td class="blb">0-1</td>
1089
<td class="blb">0-1</td>
1090
<td class="blb">0-1</td>
1091
<td class="blb"></td>
1092
<td class="blb">&nbsp;</td>
1093
<td class="blb">&nbsp;</td>
1094
<td class="blb">&nbsp;</td>
1095
<td class="blb">&nbsp;</td>
1096
</tr>
1097
<tr>
1098
<td class="bb"><a class="ref" href="#LOCATION">location</a></td>
1099
<td class="blb">0-1</td>
1100
<td class="blb">0-1</td>
1101
<td class="blb">&nbsp;</td>
1102
<td class="blb">&nbsp;</td>
1103
<td class="blb">&nbsp;</td>
1104
<td class="blb">&nbsp;</td>
1105
<td class="blb">&nbsp;</td>
1106
<td class="blb">&nbsp;</td>
1107
</tr>
1108
<tr>
1109
<td class="bb"><a class="ref" href="#ORGANIZER">organizer</a></td>
1110
<td class="blb">0-1</td>
1111
<td class="blb">0-1</td>
1112
<td class="blb">0-1</td>
1113
<td class="blb">0-1</td>
1114
<td class="blb">&nbsp;</td>
1115
<td class="blb">&nbsp;</td>
1116
<td class="blb">&nbsp;</td>
1117
<td class="blb">&nbsp;</td>
1118
</tr>
1119
<tr>
1120
<td class="bb"><a class="ref" href="#PERCENT-COMPLETE">percent</a></td>
1121
<td class="blb">&nbsp;</td>
1122
<td class="blb">0-1</td>
1123
<td class="blb">&nbsp;</td>
1124
<td class="blb">&nbsp;</td>
1125
<td class="blb">&nbsp;</td>
1126
<td class="blb">&nbsp;</td>
1127
<td class="blb">&nbsp;</td>
1128
<td class="blb">&nbsp;</td>
1129
</tr>
1130
<tr>
1131
<td class="bb"><a class="ref" href="#PRIORITY">priority</a></td>
1132
<td class="blb">0-1</td>
1133
<td class="blb">0-1</td>
1134
<td class="blb">&nbsp;</td>
1135
<td class="blb">&nbsp;</td>
1136
<td class="blb">&nbsp;</td>
1137
<td class="blb">&nbsp;</td>
1138
<td class="blb">&nbsp;</td>
1139
<td class="blb">&nbsp;</td>
1140
</tr>
1141
<tr>
1142
<td class="bb"><a class="ref" href="#RDATE">rdate</a></td>
1143
<td class="blb">0-m</td>
1144
<td class="blb">0-m</td>
1145
<td class="blb">0-m</td>
1146
<td class="blb">&nbsp;</td>
1147
<td class="blb">&nbsp;</td>
1148
<td class="blb">&nbsp;</td>
1149
<td class="blb">&nbsp;</td>
1150
<td class="blb">&nbsp;</td>
1151
</tr>
1152
<tr>
1153
<td class="bb"><a class="ref" href="#RECURRENCE-ID">recurid</a></td>
1154
<td class="blb">0-1</td>
1155
<td class="blb">0-1</td>
1156
<td class="blb">0-1</td>
1157
<td class="blb">&nbsp;</td>
1158
<td class="blb">&nbsp;</td>
1159
<td class="blb">&nbsp;</td>
1160
<td class="blb">&nbsp;</td>
1161
<td class="blb">&nbsp;</td>
1162
</tr>
1163
<tr>
1164
<td class="bb"><a class="ref" href="#RELATED-TO">related</a></td>
1165
<td class="blb">0-m</td>
1166
<td class="blb">0-m</td>
1167
<td class="blb">0-m</td>
1168
<td class="blb">&nbsp;</td>
1169
<td class="blb">&nbsp;</td>
1170
<td class="blb">&nbsp;</td>
1171
<td class="blb">&nbsp;</td>
1172
<td class="blb">&nbsp;</td>
1173
</tr>
1174
<tr>
1175
<td class="bb"><a class="ref" href="#REPEAT">repeat</a></td>
1176
<td class="blb">&nbsp;</td>
1177
<td class="blb">&nbsp;</td>
1178
<td class="blb">&nbsp;</td>
1179
<td class="blb">&nbsp;</td>
1180
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1181
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1182
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1183
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1184
</tr>
1185
<tr>
1186
<td class="bb"><a class="ref" href="#RESOURCES">resources</a></td>
1187
<td class="blb">0-m</td>
1188
<td class="blb">0-m</td>
1189
<td class="blb">&nbsp;</td>
1190
<td class="blb">&nbsp;</td>
1191
<td class="blb">&nbsp;</td>
1192
<td class="blb">&nbsp;</td>
1193
<td class="blb">&nbsp;</td>
1194
<td class="blb">&nbsp;</td>
1195
</tr>
1196
<tr>
1197
<td class="bb"><a class="ref" href="#RRULE">rrule</a></td>
1198
<td class="blb">0-m</td>
1199
<td class="blb">0-m</td>
1200
<td class="blb">0-m</td>
1201
<td class="blb">&nbsp;</td>
1202
<td class="blb">&nbsp;</td>
1203
<td class="blb">&nbsp;</td>
1204
<td class="blb">&nbsp;</td>
1205
<td class="blb">&nbsp;</td>
1206
</tr>
1207
<tr>
1208
<td class="bb"><a class="ref" href="#REQUEST-STATUS">rstatus</a></td>
1209
<td class="blb">0-m</td>
1210
<td class="blb">0-m</td>
1211
<td class="blb">0-m</td>
1212
<td class="blb">0-m</td>
1213
<td class="blb">&nbsp;</td>
1214
<td class="blb">&nbsp;</td>
1215
<td class="blb">&nbsp;</td>
1216
<td class="blb">&nbsp;</td>
1217
</tr>
1218
<tr>
1219
<td class="bb"><a class="ref" href="#SEQUENCE">sequence</a></td>
1220
<td class="blb">0-1</td>
1221
<td class="blb">0-1</td>
1222
<td class="blb">0-1</td>
1223
<td class="blb">&nbsp;</td>
1224
<td class="blb">&nbsp;</td>
1225
<td class="blb">&nbsp;</td>
1226
<td class="blb">&nbsp;</td>
1227
<td class="blb">&nbsp;</td>
1228
</tr>
1229
<tr>
1230
<td class="bb"><a class="ref" href="#STATUS">status</a></td>
1231
<td class="blb">0-1</td>
1232
<td class="blb">0-1</td>
1233
<td class="blb">0-1</td>
1234
<td class="blb">&nbsp;</td>
1235
<td class="blb">&nbsp;</td>
1236
<td class="blb">&nbsp;</td>
1237
<td class="blb">&nbsp;</td>
1238
<td class="blb">&nbsp;</td>
1239
</tr>
1240
<tr>
1241
<td class="bb"><a class="ref" href="#SUMMARY">summary</a></td>
1242
<td class="blb">0-1</td>
1243
<td class="blb">0-1</td>
1244
<td class="blb">0-1</td>
1245
<td class="blb">&nbsp;</td>
1246
<td class="blb">&nbsp;</td>
1247
<td class="blb">&nbsp;</td>
1248
<td class="blb">1</td>
1249
<td class="blb">&nbsp;</td>
1250
</tr>
1251
<tr>
1252
<td class="bb"><a class="ref" href="#TRANSP">transp</a></td>
1253
<td class="blb">0-1</td>
1254
<td class="blb">&nbsp;</td>
1255
<td class="blb">&nbsp;</td>
1256
<td class="blb">&nbsp;</td>
1257
<td class="blb">&nbsp;</td>
1258
<td class="blb">&nbsp;</td>
1259
<td class="blb">&nbsp;</td>
1260
<td class="blb">&nbsp;</td>
1261
</tr>
1262
<tr>
1263
<td class="bb"><a class="ref" href="#TRIGGER">trigger</a></td>
1264
<td class="blb">&nbsp;</td>
1265
<td class="blb">&nbsp;</td>
1266
<td class="blb">&nbsp;</td>
1267
<td class="blb">&nbsp;</td>
1268
<td class="blb">1</td>
1269
<td class="blb">1</td>
1270
<td class="blb">1</td>
1271
<td class="blb">1</td>
1272
</tr>
1273
<tr>
1274
<td class="bb"><a class="ref" href="#UID">uid</a></td>
1275
<td class="blb">0-1</td>
1276
<td class="blb">0-1</td>
1277
<td class="blb">0-1</td>
1278
<td class="blb">0-1</td>
1279
<td class="blb">&nbsp;</td>
1280
<td class="blb">&nbsp;</td>
1281
<td class="blb">&nbsp;</td>
1282
<td class="blb">&nbsp;</td>
1283
</tr>
1284
<tr>
1285
<td class="bb"><a class="ref" href="#URL">url</a></td>
1286
<td class="blb">0-1</td>
1287
<td class="blb">0-1</td>
1288
<td class="blb">0-1</td>
1289
<td class="blb">0-1</td>
1290
<td class="blb">&nbsp;</td>
1291
<td class="blb">&nbsp;</td>
1292
<td class="blb">&nbsp;</td>
1293
<td class="blb">&nbsp;</td>
1294
</tr>
1295
<tr>
1296
<td class="bb"><a class="ref" href="#X-PROPERTY_PROP">x-prop</a></td>
1297
<td class="blb">0-m</td>
1298
<td class="blb">0-m</td>
1299
<td class="blb">0-m</td>
1300
<td class="blb">0-m</td>
1301
<td class="blb">0-m</td>
1302
<td class="blb">0-m</td>
1303
<td class="blb">0-m</td>
1304
<td class="blb">0-m</td>
1305
</tr>
1306
</table>
1307
<p>
1308
If not set, the <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties
1309
are automatically created by iCalcreator<br>
1310
for <a href="#VEVENT">vevent</a>,<a href="#VTODO">vtodo</a>, <a href="#VJOURNAL">vjournal</a> and <a href="#VFREEBUSY">vfreebusy</a> components<br>
1311
when using iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or <a href="#returnCalendar">returnCalendar</a><br>
1312
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>.
1313
</p>
1314
<br>
1315
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
1316

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

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

    
1321
<a name="Calendar_object_constructors"></a><h3>3.1.1 Constructors</h3>
1322
<a name="vcalendar_constr"></a><h4>3.1.1.1 vcalendar</h4>
1323
<p>Create a new <a href="#VCALENDAR">VCALENDAR</a> object.</p>
1324
<p class="label">Format</p>
1325
<p class="format">vcalendar::vcalendar( [ config ] )</p>
1326
<p class="comment">
1327
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1328
</p>
1329
<p class="label">Basic example</p>
1330
<p class="example">&lt;?php
1331
.. .
1332
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
1333
$vcalendar = new vcalendar( $config );
1334
...
1335
</p>
1336
<p>
1337
The <strong>calendar</strong> property PRODID and each component property <a href="#UID">UID</a> are AUTOMATICALLY generated in iCalcreator,
1338
if not set manually, and based on the configuration <a href="#Unique_id">unique_id</a>.
1339
</p>
1340
<p class="label">Extended example</p>
1341
<p class="example">&lt;?php
1342
.. .
1343
$tz        = &quot;Europe/Stockholm&quot;
1344
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;
1345
                    &quot;TZID&quot;      =&gt; $tz );
1346
$vcalendar = new vcalendar( $config );
1347
$vcalendar-&gt;setProperty( "X-WR-TIMEZONE", $tz );
1348
.. .
1349
.. .  // <span class="comment">insert components or parse an iCal file (and edit components)</span>
1350
.. .
1351
$xprops    = array( &quot;X-LIC-LOCATION&quot; => $tz );
1352
iCalUtilityFunctions::createTimezone( $vcalendar, $tz, $xprops );
1353
.. .
1354
</p>
1355
<p>
1356
The <a href="#dTZID">TZID</a> config key and value (timezone) is supplied when setting <a href="#DTSTART">DTSTART</a>,
1357
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>,
1358
if not set manually, a TZID <b>auto completion</b>.
1359
</p>
1360
<p>
1361
Some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
1362
and vtimezone component with property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>,
1363
review <a href="#createTimezone">createTimezone</a>, a function in iCalUtilityFunctions class.
1364
</p>
1365
<p>
1366
Do <b>NOT</b> set <a href="#Directory">directory</a>/<a href="#Filename">filename</a> in vcalendar constructor, due to inability to detect error (FALSE) config return.
1367
</p>
1368
<br>
1369
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1370

    
1371

    
1372
<a name="vevent_constr"></a><h4>3.1.1.2 vevent</h4>
1373
<p class="label">Format 1</p>
1374
<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>
1375
<p class="format">vcalendar::newComponent( &quot;vevent&quot; )</p>
1376
<p class="label">Example</p>
1377
<p class="example">&lt;?php
1378
.. .
1379
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1380
$vcalendar = new vcalendar( $config );
1381
...
1382
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
1383
$vevent-&gt;setProperty(...
1384
...
1385
</p>
1386
<p class="label">Format 2</p>
1387
<p>Create a new <a href="#VEVENT">VEVENT</a> object.</p>
1388
<p class="format">vevent::vevent( [ config ] )</p>
1389
<p class="comment">
1390
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1391
</p>
1392
<p class="label">Example</p>
1393
<p class="example">&lt;?php
1394
.. .
1395
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1396
$vcalendar = new vcalendar( $config );
1397
...
1398
$config    = $vcalendar-&gt;getConfig();
1399
$vevent    = new vevent( $config );
1400
$vevent-&gt;setProperty(...
1401
...
1402
$vcalendar-&gt;setComponent( $vevent );
1403
...
1404
</p>
1405
<br>
1406
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1407

    
1408

    
1409
<a name="vtodo_constr"></a><h4>3.1.1.3 vtodo</h4>
1410
<p class="label">Format 1</p>
1411
<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>
1412
<p class="format">vcalendar::newComponent( &quot;vtodo&quot; )</p>
1413
<p class="label">Example</p>
1414
<p class="example">&lt;?php
1415
.. .
1416
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1417
$vcalendar = new vcalendar( $config );
1418
...
1419
$vtodo     = &amp; $vcalendar-&gt;newComponent( &quot;vtodo&quot; );
1420
$vtodo-&gt;setProperty(...
1421
...
1422
</p>
1423
<p class="label">Format 2</p>
1424
<p>Create a new <a href="#VTODO">VTODO</a> object.</p>
1425
<p class="format">vtodo::vtodo( [ config ] )</p>
1426
<p class="comment">
1427
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1428
</p>
1429
<p class="label">Example</p>
1430
<p class="example">&lt;?php
1431
.. .
1432
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1433
$vcalendar = new vcalendar( $config );
1434
...
1435
$vtodo     = new vtodo( $vcalendar-&gt;getConfig());
1436
$vtodo-&gt;setProperty(...
1437
...
1438
$vcalendar-&gt;setComponent( $vtodo );
1439
...
1440
</p>
1441
<br>
1442
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1443

    
1444

    
1445
<a name="vjournal_constr"></a><h4>3.1.1.4 vjournal</h4>
1446
<p class="label">Format 1</p>
1447
<p>Create a new <a href="#VJOUNAL">VJOURNAL</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
1448
<p class="format">vcalendar::newComponent( &quot;vjournal&quot; )</p>
1449
<p class="label">Example</p>
1450
<p class="example">&lt;?php
1451
.. .
1452
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1453
$vcalendar = new vcalendar( $config );
1454
...
1455
$vjournal  = &amp; $vcalendar-&gt;newComponent( &quot;vjournal&quot; );
1456
$vjournal-&gt;setProperty(...
1457
...
1458
</p>
1459
<p class="label">Format 2</p>
1460
<p>Create a new <a href="#VJOURNAL">VJOURNAL</a> object.</p>
1461
<p class="format">vjournal::vjournal( [ config ] )</p>
1462
<p class="comment">
1463
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1464
</p>
1465
<p class="label">Example</p>
1466
<p class="example">&lt;?php
1467
.. .
1468
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1469
$vcalendar = new vcalendar( $config );
1470
...
1471
$vjournal  = new vjournal( $vcalendar-&gt;getConfig());
1472
$vjournal-&gt;setProperty(...
1473
...
1474
$vcalendar-&gt;setComponent( $vjournal );
1475
...
1476
</p>
1477
<br>
1478
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1479

    
1480

    
1481
<a name="vfreebusy_constr"></a><h4>3.1.1.5 vfreebusy</h4>
1482
<p class="label">Format 1</p>
1483
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
1484
<p class="format">vcalendar::newComponent( &quot;vfreebusy&quot; )</p>
1485
<p class="label">Example</p>
1486
<p class="example">&lt;?php
1487
.. .
1488
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1489
$vcalendar = new vcalendar( $config );
1490
...
1491
$vfreebusy = &amp; $vcalendar-&gt;newComponent( &quot;vfreebusy&quot; );
1492
$vfreebusy-&gt;setProperty(...
1493
...
1494
</p>
1495
<p class="label">Format 2</p>
1496
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object.</p>
1497
<p class="format">vfreebusy::vfreebusy( [ config ] )</p>
1498
<p class="comment">
1499
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1500
</p>
1501
<p class="label">Example</p>
1502
<p class="example">&lt;?php
1503
.. .
1504
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1505
$vcalendar = new vcalendar( $config );
1506
...
1507
$vfreebusy = new vfreebusy( $vcalendar-&gt;getConfig());
1508
$vfreebusy-&gt;setProperty(...
1509
...
1510
$vcalendar-&gt;setComponent( $vfreebusy );
1511
...
1512
</p>
1513
<br>
1514
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1515

    
1516

    
1517
<a name="valarm_constr"></a><h4>3.1.1.6 valarm</h4>
1518
<p class="label">Format 1</p>
1519
<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>
1520
<p class="format">calendarComponent::newComponent( &quot;valarm&quot; )</p>
1521
<p class="label">Example</p>
1522
<p class="example">&lt;?php
1523
.. .
1524
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1525
$vcalendar = new vcalendar( $config );
1526
...
1527
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
1528
$vevent-&gt;setProperty(...
1529
...
1530
$valarm    = &amp; $vevent-&gt;newComponent( &quot;valarm&quot; );
1531
$valarm-&gt;setProperty(...
1532
...
1533
</p>
1534
<p class="label">Format 2</p>
1535
<p>Create a new <a href="#VALARM">VALARM</a> object.</p>
1536
<p class="format">valarm::valarm( [ config ] )</p>
1537
<p class="comment">
1538
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1539
</p>
1540
<p class="label">Example</p>
1541
<p class="example">&lt;?php
1542
.. .
1543
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1544
$vcalendar = new vcalendar( $config );
1545
...
1546
$vevent    = new vevent();
1547
$vevent-&gt;setProperty(...
1548
...
1549
$valarm    = new valarm( $vevent-&gt;getConfig());
1550
$valarm-&gt;setProperty(...
1551
...
1552
$vevent-&gt;setComponent( $valarm );
1553
...
1554
$vcalendar-&gt;setComponent( $vevent );
1555
...
1556
</p>
1557
<br>
1558
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1559

    
1560

    
1561
<a name="vtimezone_constr"></a><h4>3.1.1.7 vtimezone</h4>
1562
<p>
1563
The vtimezone component describe, at a minimum, the base offset from <b>UTC</b> for the time zone.
1564
For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
1565
</p>
1566
<p class="label">Format 1</p>
1567
<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>
1568
<p class="format">vcalendar::newComponent( &quot;vtimezone&quot; )</p>
1569
<p class="label">Example</p>
1570
<p class="example">&lt;?php
1571
.. .
1572
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1573
$vcalendar = new vcalendar( $config );
1574
...
1575
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
1576
$vtimezone-&gt;setProperty(...
1577
...
1578
</p>
1579
<p class="label">Format 2</p>
1580
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object.</p>
1581
<p class="format">vtimezone::vtimezone( [ config ] )</p>
1582
<p class="comment">
1583
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1584
</p>
1585
<p class="label">Example</p>
1586
<p class="example">&lt;?php
1587
.. .
1588
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1589
$vcalendar = new vcalendar( $config );
1590
...
1591
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
1592
$vtimezone-&gt;setProperty(...
1593
...
1594
$vcalendar-&gt;setComponent( $vtimezone );
1595
...
1596
</p>
1597
<br>
1598
<h5>Creation of timezone components</h5>
1599
<p>
1600
It is possible to create timezone components, using a function in iCalUtilityFunctions class, <a href="#createTimezone">createTimezone</a>
1601
and utilizing the <em>PHP</em> DateTimeZone class (<em>PHP</em> 5 >= 5.2.0).
1602
</p>
1603
<br>
1604
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1605

    
1606
<a name="standard_constr"></a><h4>3.1.1.8 standard</h4>
1607
<p class="label">Format 1</p>
1608
<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>
1609
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
1610
<p class="label">Example</p>
1611
<p class="example">&lt;?php
1612
.. .
1613
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1614
$vcalendar = new vcalendar( $config );
1615
...
1616
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
1617
$vtimezone-&gt;setProperty(...
1618
...
1619
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
1620
$standard-&gt;setProperty(...
1621
...
1622
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
1623
$daylight-&gt;setProperty(...
1624
...
1625
</p>
1626
<p class="label">Format 2</p>
1627
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> STANDARD object.</p>
1628
<p class="format">vtimezone::vtimezone( &quot;standard&quot; [, config ] )</p>
1629
<p class="comment">
1630
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1631
</p>
1632
<p class="label">Example</p>
1633
<p class="example">&lt;?php
1634
.. .
1635
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1636
$vcalendar = new vcalendar( $config );
1637
...
1638
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
1639
$vtimezone-&gt;setProperty(...
1640
...
1641
$standard  = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
1642
$standard-&gt;setProperty(...
1643
...
1644
$vtimezone-&gt;setComponent( $standard );
1645
...
1646
$daylight  = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig());
1647
$daylight-&gt;setProperty(...
1648
...
1649
$vtimezone-&gt;setComponent( $daylight );
1650
...
1651
$vcalendar-&gt;setComponent( $vtimezone );
1652
...
1653
</p>
1654
<br>
1655
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1656

    
1657

    
1658
<a name="daylight_constr"></a><h4>3.1.1.9 daylight</h4>
1659
<p class="label">Format 1</p>
1660
<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>
1661
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
1662
<p class="label">Example</p>
1663
<p class="example">&lt;?php
1664
.. .
1665
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1666
$vcalendar = new vcalendar( $config );
1667
...
1668
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
1669
...
1670
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
1671
...
1672
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
1673
...
1674
</p>
1675
<p class="label">Format 2</p>
1676
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> DAYLIGHT object.</p>
1677
<p class="format">vtimezone::vtimezone( &quot;daylight&quot; [, config ] )</p>
1678
<p class="comment">
1679
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1680
</p>
1681
<p class="label">Example</p>
1682
<p class="example">&lt;?php
1683
.. .
1684
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1685
$vcalendar = new vcalendar( $config );
1686
...
1687
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
1688
...
1689
$standard  = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
1690
...
1691
$vtimezone-&gt;setComponent( $standard );
1692
$daylight  = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig() );
1693
...
1694
$vtimezone-&gt;setComponent( $daylight );
1695
$vcalendar-&gt;setComponent( $vtimezone );
1696
...
1697
</p>
1698
<br>
1699
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1700

    
1701

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

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

    
1727

    
1728
<a name="getProperty"></a><h4>3.1.2.2 getProperty</h4>
1729
<p class="label">Format 1</p>
1730
<p>Generic iCalcreator getProperty method, simplifying fetch of <strong>calendar</strong> properties.</p>
1731
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
1732
<p class="format">vcalendar::getProperty( [ PropName [, order=1 [, complete=FALSE ]]] )</p>
1733
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
1734
           unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
1735
order    = (int) if missing 1st/next occurrence,
1736
           used with multiply (property) occurrences
1737
complete = (bool) FALSE (default) : output only property value
1738
                  TRUE            : output = array( &quot;value&quot;=&gt; &lt;value&gt; ,&quot;params&quot; =&gt; &lt;parameter array&gt;)
1739
</p>
1740
<p class="label">Example 1</p>
1741
<p class="example">&lt;?php
1742
.. .
1743
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1744
$vcalendar = new vcalendar( $config );
1745
$vcalendar-&gt;parse();
1746
$calscale  = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
1747
.. .
1748
</p>
1749
<p class="label">Example 2</p>
1750
<p class="example">&lt;?php
1751
.. .
1752
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1753
$vcalendar    = new vcalendar( $config );
1754
$vcalendar-&gt;parse();
1755
while( $xprop = $vcalendar-&gt;getProperty( )) { // <span class="comment">get x-properties</span>
1756
.. .
1757
</p>
1758
<a name="getProperty2"></a>
1759
<a name="geoLocation"></a>
1760
<p class="label">Format 2</p>
1761
<p>
1762
Ability to fetch specific <i>component</i> property (unique) value(-s) and number of occurrence(-s).
1763
 The search includes <b>ALL</b> components within the iCalcreator object instance.
1764
</p>
1765
<p>
1766
Outputs an array( *[ (string) unique-property-value =&gt; (int) number_of_occurrence ] ) or an empty array if no hits.
1767
The array is sorted by (asc.) key. If a property contains multiple values (like &quot;CATAGORIES:course1,courseB&quot; or
1768
 &quot;RESOURCES:pc,camera&quot;), they are split into unique values.
1769
</p>
1770
<dl>
1771
<dt>Supported Descriptive Component Properties
1772
<dd><a href="#CATEGORIES">CATEGORIES</a>
1773
<dd><a href="#LOCATION">LOCATION</a>
1774
<dd>GEOLOCATION&nbsp;<sup>*1</sup>
1775
<dd><a href="#PRIORITY">PRIORITY</a>
1776
<dd><a href="#RESOURCES">RESOURCES</a>
1777
<dd><a href="#STATUS">STATUS</a>
1778
<dd><a href="#SUMMARY">SUMMARY</a>
1779
<dt>Supported Date and Time Component Property
1780
<dd><a href="#DTSTART">DTSTART</a>&nbsp;<sup>*2</sup>
1781
<dt>Supported Relationship Component Properties
1782
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*3</sup>
1783
<dd><a href="#CONTACT">CONTACT</a>
1784
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*3</sup>
1785
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>&nbsp;<sup>*4</sup> (alt. &quot;R-UID&quot;)
1786
<dd><a href="#RELATED-TO">RELATED-TO</a>
1787
<dd><a href="#URL">URL</a>
1788
<dd><a href="#UID">UID</a>
1789
</dl>
1790
<dl>
1791
<dt><sup>*1</sup>
1792
<dd>Using the non-standard directive &quot;GEOLOCATION&quot;, iCalcreator returns output supporting<br>
1793
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
1794
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
1795
 (only if <a href="#GEO">GEO</a> is set).
1796
<dt><sup>*2</sup>
1797
<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>
1798
 recurrence set are NOT included, only the origin start date (<a href="#DTSTART">DTSTART</a>)).
1799
<dt><sup>*3</sup>
1800
<dd>The <a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> output values are prefixed
1801
 by &quot;protocol&quot; like &quot;MAILTO:chair@kigkonsult.se&quot;.
1802
<dt><sup>*4</sup>
1803
<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.
1804
</dl>
1805
<p>
1806
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
1807
</p>
1808
<p>
1809
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
1810
</p>
1811
<p class="format">vcalendar::getProperty( PropName )</p>
1812
<p class="comment">propName = (string) case independent, property name</p>
1813
<p class="label">Example 1</p>
1814
<p>Fetch all attendees in the iCalcreator object instance.</p>
1815
<p class="example">&lt;?php
1816
.. .
1817
$attendees = $vcalendar-&gt;getProperty( &quot;ATTENDEE&quot; );
1818
foreach( $attendees as $attendee => $occurrCount ) {
1819
.. .
1820
</p>
1821
<p class="label">Example 2</p>
1822
<p>Fetch all DTSTARTs in the iCalcreator object instance.</p>
1823
<p class="example">&lt;?php
1824
.. .
1825
$startDates = $vcalendar-&gt;getProperty( &quot;DTSTART&quot; );
1826
foreach( $startDates as $startDate => $occurrCount ) {
1827
.. .
1828
</p>
1829
<br>
1830
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1831

    
1832

    
1833
<a name="setProperty"></a><h4>3.1.2.3 setProperty</h4>
1834
<p>Generic the iCalcreator object setProperty method,simplifying insert of <strong>calendar</strong> properties.</p>
1835
<p>A successful update returns TRUE.</p>
1836
<p class="label">Format</p>
1837
<p class="format">vcalendar::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
1838
<p class="comment">propName = (string) case independent, strict [RFC5545] <strong>calendar</strong> property names,
1839
                                      unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY">X-property</a>.
1840
Proparg  = (mixed) property argument
1841
           Last property argument is a (optional) property dependent parameters
1842
           array( *[(string) key =&gt; (string) value ] ).
1843
           A non-standard (, experimental) parameter key MUST be prefixed by &quot;X-&quot;.
1844
</p>
1845
<p class="label">Example</p>
1846
<p class="example">&lt;?php
1847
.. .
1848
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
1849
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot;,
1850
                    &quot;TZID&quot;      =&gt; &quot;Europe/Stockholm&quot; );
1851
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
1852
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
1853
...
1854
</p>
1855
<br>
1856
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1857

    
1858

    
1859
<a name="CALSCALE"></a><h4>3.1.2.4 CALSCALE</h4>
1860
<p>
1861
This property defines the <strong>calendar</strong> scale used for the <strong>calendar</strong> information specified in the <strong>iCalendar</strong> object.
1862
</p>
1863
<p>
1864
The default value is &quot;GREGORIAN&quot;, implied when missing.
1865
</p>
1866
<h5>Create CALSCALE</h5>
1867
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
1868
<p class="label">Format</p>
1869
<p class="format">vcalendar::createCalscale()</p>
1870
<p class="label">Example</p>
1871
<p class="example">&lt;?php
1872
.. .
1873
$str = $vcalendar-&gt;createCalscale();
1874
...
1875
</p>
1876
<h5>Delete CALSCALE</h5>
1877
<p>Remove CALSCALE from calendar.</p>
1878
<p class="label">Format</p>
1879
<p class="format">vcalendar::deleteProperty( &quot;calscale&quot; )</p>
1880
<p class="label">Example</p>
1881
<p class="example">&lt;?php
1882
.. .
1883
$vcalendar-&gt;deleteProperty( &quot;CALSCALE&quot; );
1884
...
1885
</p>
1886
<h5>Get Calscale</h5>
1887
<p>If set, returns property value, otherwise FALSE.</p>
1888
<p class="label">Format</p>
1889
<p class="format">vcalendar::getProperty( &quot;calscale&quot; )</p>
1890
<p class="label">Example</p>
1891
<p class="example">&lt;?php
1892
.. .
1893
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1894
$vcalendar = new vcalendar( $config );
1895
$vcalendar-&gt;parse();
1896
$calscale  = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
1897
.. .
1898
</p>
1899
<h5>Set CALSCALE</h5>
1900
<p>Insert property value.</p>
1901
<p class="label">Format</p>
1902
<p class="format">vcalendar::setProperty( &quot;calscale&quot;, value )</p>
1903
<p class="comment">value = (string) calscale value</p>
1904
<p class="label">Example</p>
1905
<p class="example">&lt;?php
1906
.. .
1907
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1908
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
1909
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
1910
.. .
1911
</p>
1912
<br>
1913
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1914

    
1915

    
1916
<a name="METHOD"></a><h4>3.1.2.5 METHOD</h4>
1917
<p>
1918
This property defines the <strong>iCalendar</strong> object method associated with the <strong>calendar</strong> object.
1919
</p>
1920
<p>
1921
METHOD property (value PUBLISH etc.) may be required when importing iCal files
1922
into some calendaring software (MS etc.), as well as <a href="#X-PROPERTY">x-properties</a>
1923
"X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"
1924
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
1925
</p>
1926
<h5>Create METHOD</h5>
1927
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
1928
<p class="label">Format</p>
1929
<p class="format">vcalendar::createMethod()</p>
1930
<p class="label">Example</p>
1931
<p class="example">&lt;?php
1932
.. .
1933
$str = $vcalendar-&gt;createMethod();
1934
...
1935
</p>
1936
<h5>Delete METHOD</h5>
1937
<p>Remove METHOD from calendar.</p>
1938
<p class="label">Format</p>
1939
<p class="format">vcalendar::deleteProperty( &quot;METHOD&quot; )</p>
1940
<p class="label">Example</p>
1941
<p class="example">&lt;?php
1942
.. .
1943
$vcalendar-&gt;deleteProperty( &quot;METHOD&quot; );
1944
...
1945
</p>
1946
<h5>Get METHOD</h5>
1947
<p>If set, returns property value, otherwise FALSE.</p>
1948
<p class="label">Format</p>
1949
<p class="format">vcalendar::getProperty( &quot;method&quot; );</p>
1950
<p class="label">Example</p>
1951
<p class="example">&lt;?php
1952
.. .
1953
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;);
1954
$vcalendar = new vcalendar( $config );
1955
$vcalendar-&gt;parse();
1956
$method    = $vcalendar-&gt;getProperty( &quot;method&quot; );
1957
.. .
1958
</p>
1959
<h5>Set METHOD</h5>
1960
<p>Insert property value.</p>
1961
<p class="label">Format</p>
1962
<p class="format">vcalendar::setProperty( &quot;method&quot;, value )</p>
1963
<p class="comment">value = (string) method value</p>
1964
<p class="label">Example</p>
1965
<p class="example">&lt;?php
1966
.. .
1967
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1968
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
1969
$vcalendar-&gt;setProperty( &quot;method&quot;, &quot;PUBLISH&quot; );
1970
...
1971
</p>
1972
<br>
1973
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1974

    
1975

    
1976
<a name="VERSION"></a><h4>3.1.2.6 VERSION</h4>
1977
<p>
1978
This property specifies the identifier corresponding to the version number of the <strong>iCalendar</strong> specification.
1979
This property is always placed first in the <strong>calendar</strong> file.
1980
</p>
1981
<h5>Create Version</h5>
1982
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
1983
<p class="label">Format</p>
1984
<p class="format">vcalendar::createVersion()</p>
1985
<p class="label">Example</p>
1986
<p class="example">&lt;?php
1987
.. .
1988
$str = $vcalendar-&gt;createVersion();
1989
...
1990
</p>
1991
<h5>Get Version</h5>
1992
<p>Fetch property value.</p>
1993
<p class="label">Format</p>
1994
<p class="format">vcalendar::getProperty( &quot;version&quot; )</p>
1995
<p class="label">Example</p>
1996
<p class="example">&lt;?php
1997
.. .
1998
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1999
$vcalendar = new vcalendar( $config );
2000
$vcalendar-&gt;parse();
2001
$version   = $vcalendar-&gt;getProperty( &quot;version&quot; )
2002
.. .
2003
</p>
2004
<h5>Set Version</h5>
2005
<p>Insert property value.
2006
Only version 2.0 valid, version is <b>AUTO</b> generated at <strong>calendar</strong> creation.</p>
2007
<p class="label">Format</p>
2008
<p class="format">vcalendar::setProperty( &quot;version&quot;, version )</p>
2009
<p class="comment">version = (string) iCal version</p>
2010
<p class="label">Example</p>
2011
<p class="example">&lt;?php
2012
.. .
2013
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2014
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
2015
$vcalendar-&gt;setProperty( &quot;version&quot;, &quot;2.0&quot; );
2016
...
2017
</p>
2018
<br>
2019
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
2020

    
2021
<a name="X-PROPERTY"></a><h4>3.1.2.7 X-PROPERTY</h4>
2022
<p>
2023
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>,
2024
an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
2025
</p>
2026
<p>
2027
X-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"  may be required when importing iCal files
2028
into some calendaring software (MS etc.), as well as <a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
2029
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
2030
</p>
2031
<p>The value type is TEXT.</p>
2032
<h5>Create X-property</h5>
2033
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
2034
<p class="label">Format</p>
2035
<p class="format">vcalendar::createXprop()</p>
2036
<p class="label">Example</p>
2037
<p class="example">&lt;?php
2038
.. .
2039
$str = $vcalendar-&gt;createXprop();
2040
...
2041
</p>
2042
<h5>Delete X-PROPERTY</h5>
2043
<p>Remove X-PROPERTY from <strong>calendar</strong>.</p>
2044
<p class="label">Format</p>
2045
<p class="format">vcalendar::deleteProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
2046
<p class="label">Example 1</p>
2047
<p>Delete the x-property named &quot;X-PROPERTY&quot;.</p>
2048
<p class="example">&lt;?php
2049
.. .
2050
$vcalendar-&gt;deleteProperty( &quot;X-PROPERTY&quot; );
2051
...
2052
</p>
2053
<p class="label">Example 2</p>
2054
<p>Delete all x-properties.</p>
2055
<p class="example">&lt;?php
2056
.. .
2057
while( $vcalendar-&gt;deleteProperty())
2058
  continue;
2059
...
2060
</p>
2061
<h5>Get X-PROPERTY</h5>
2062
<p>If set, returns property (name and) value, otherwise FALSE.</p>
2063
<p class="label">Format</p>
2064
<p class="format">vcalendar::getProperty()</p>
2065
<p class="format">vcalendar::getProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
2066
<p class="comment">output = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</p>
2067
<p class="format">vcalendar::getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
2068
<p class="comment">propOrderNo = (int) specific property value</p>
2069
<p class="comment">output = array( propertyName<sup>1</sup>
2070
              , array( &quot;value&quot;  =&gt; propertyData<sup>2</sup> )
2071
                     , &quot;params&quot; =&gt; params<sup>3</sup>))
2072
</p>
2073
<p class="label">Example 1</p>
2074
<p>Read all x-prop values in a loop.</p>
2075
<p class="example">&lt;?php
2076
.. .
2077
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2078
$vcalendar    = new vcalendar( $config );
2079
$vcalendar-&gt;parse();
2080
while( $xprop = $vcalendar-&gt;getProperty( )) { // <span class="comment">$xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
2081
.. .
2082
</p>
2083
<p class="label">Example 2</p>
2084
<p>If exists, read X-WR-TIMEZONE x-prop</p>
2085
<p class="example">&lt;?php
2086
.. .
2087
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2088
$vcalendar = new vcalendar( $config );
2089
$vcalendar-&gt;parse();
2090
if( $xprop = $vcalendar-&gt;getProperty( &quot;X-WR-TIMEZONE&quot; )) {
2091
.. . // <span class="comment">$xprop = array( &quot;X-WR-TIMEZONE&quot;, propertyData<sup>2</sup> )</span>
2092
.. .
2093
</p>
2094
<p class="label">Example 3</p>
2095
<p class="example">&lt;?php
2096
.. .
2097
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2098
$vcalendar    = new vcalendar( $config );
2099
$vcalendar-&gt;parse();
2100
while( $xprop = $vcalendar-&gt;getProperty( FALSE, FALSE, TRUE )) {
2101
     /* <span class="comment">$xprop = array( propertyName<sup>1</sup>
2102
                                         , array( &quot;value &quot;   =&gt; propertyData<sup>2</sup>
2103
                                                   , &quot;params &quot;=&gt; params<sup>3</sup> ))</span>
2104
     */
2105
.. .
2106
</p>
2107
<h5>Set X-PROPERTY</h5>
2108
Insert property name and value. If an x-prop with the same name already exists, it will be replaced.
2109
PropertyNames are always stored upperCase, ex. x-wr-calname =&gt; X-WR-CALNAME.
2110
<p class="label">Format</p>
2111
<p class="format">vcalendar::setProperty( propertyName, propertyData [, params ] )</p>
2112
<p class="comment">propertyName<sup>1</sup> = (string) Any property name with a &quot;X-&quot; prefix
2113
propertyData<sup>2</sup> = (string) Value type TEXT
2114
params<sup>3</sup>       = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams] )
2115
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
2116
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
2117
lang<sup>*</sup>         = as defined in [RFC5646]
2118
</p>
2119
<p class="label">Example</p>
2120
<p class="example">&lt;?php
2121
.. .
2122
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2123
$vcalendar = new vcalendar( $config ); // initiate new CALENDAR
2124
     // <span class="comment">set some X-properties.. .</span>
2125
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;,  &quot;Calendar Sample&quot; )
2126
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;,  &quot;Calendar Description&quot; );
2127
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
2128
...
2129
</p>
2130
<br>
2131
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
2132

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

    
2135
<a name="deleteComponent"></a><h4>3.1.3.1 deleteComponent</h4>
2136
<p>
2137
Remove component from the iCalcreator object instance.
2138
</p>
2139
<p>
2140
FALSE is returned if no component exists or when end-of-components at consecutive function calls.
2141
</p>
2142
<p class="label">format 1</p>
2143
Remove component with order number (1st=1, 2nd=2.. .).
2144
<p class="format">vcalendar::deleteComponent( orderNumber )</p>
2145
<p class="comment">orderNumber = (int) order number</p>
2146
<p class="label">format 2</p>
2147
<P>Remove component with component type (e.g. &quot;vevent&quot;) and order 1 alt. suborder number.</p>
2148
<p class="format">vcalendar::deleteComponent( componentType [, componentSuborderNumber])</p>
2149
<p class="comment">componentType           = (string) component type
2150
componentSuborderNumber = (int) order number</p>
2151
<p class="label">format 3</p>
2152
<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>
2153
<p class="format">vcalendar::deleteComponent( <a href="#UID">UID</a> )</p>
2154
<p class="label">Example 1</p>
2155
<p class="example">&lt;?php
2156
.. .
2157
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2158
$vcalendar = new vcalendar( $config );
2159
$vcalendar-&gt;parse();
2160
$vcalendar-&gt;deleteComponent( 1 );
2161
$vcalendar-&gt;deleteComponent( &quot;vtodo&quot;, 2 );
2162
$vcalendar-&gt;deleteComponent( &quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;);
2163
.. .
2164
</p>
2165
<p class="label">Example 2</p>
2166
<p>Deleting all components, using format 2 without order number.</p>
2167
<p class="example">&lt;?php
2168
.. .
2169
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2170
$vcalendar = new vcalendar( $config );
2171
$vcalendar-&gt;parse();
2172
.. .
2173
while( $vcalendar-&gt;deleteComponent( &quot;vevent&quot;))
2174
  continue;
2175
.. .
2176
$vtodo = $vcalendar-&gt;getComponent( &quot;vtodo&quot; );
2177
while( $vtodo-&gt;deleteComponent( &quot;valarm&quot;))
2178
  continue;
2179
.. .
2180
</p>
2181
<br>
2182
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2183

    
2184
<a name="getComponent"></a><h4>3.1.3.2 getComponent</h4>
2185
<p>Get (next) component from the iCalcreator object instance.</p>
2186
<p>
2187
FALSE is returned if no component exists or when end-of-components at consecutive function calls.
2188
</p>
2189
<p class="label">format 1</p>
2190
<p>Get next component, until end-of-components.</p>
2191
<p class="format">vcalendar::getComponent()</p>
2192
<p class="label">Example</p>
2193
<p class="example">&lt;?php
2194
.. .
2195
$config      = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2196
$vcalendar   = new vcalendar( $config );
2197
$vcalendar-&gt;parse();
2198
while( $comp = $vcalendar-&gt;getComponent()) {
2199
.. .
2200
}
2201
.. .
2202
</p>
2203
<p class="label">format 2</p>
2204
<P>Get specific component with order number (1st=1, 2nd=2.. .).</p>
2205
<p class="format">vcalendar::getComponent( orderNumber )</p>
2206
<p class="comment">orderNumber = (int) order number</p>
2207
<p class="label">Example</p>
2208
<p class="example">&lt;?php
2209
.. .
2210
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2211
$vcalendar = new vcalendar( $config );
2212
$vcalendar-&gt;parse();
2213
if( $comp  = $vcalendar-&gt;getComponent( 1 )) {
2214
.. .
2215
}
2216
.. .
2217
</p>
2218

    
2219
<p class="label">format 3</p>
2220
<p>
2221
Get (first/next) component with component type (until end-of-components) alt.
2222
get specific component with component type and suborder number (1st=1, 2nd=2.. .).
2223
</p>
2224
<p class="format">vcalendar::getComponent( componentType [, componentSuborderNumber])</p>
2225
<p class="comment">componentType           = (string) component type
2226
componentSuborderNumber = (int) order number</p>
2227
<p class="label">Example</p>
2228
<p class="example">&lt;?php
2229
.. .
2230
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2231
$vcalendar = new vcalendar( $config );
2232
$vcalendar-&gt;parse();
2233
if( $comp  = $vcalendar-&gt;getComponent( &quot;vtodo&quot;, 2 )) {
2234
.. .
2235
}
2236
.. .
2237
</p>
2238

    
2239
<p class="label">format 4</p>
2240
<p>
2241
Get (first/next) component with <a href="#UID">UID</a> as key.
2242
(<a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.)
2243
May be used when trying to find (base) component and corresponding <a href="#RECURRENCE-ID">RECURRENCE-ID</a> components.
2244
</p>
2245
<p class="format">vcalendar::getComponent( <a href="#UID">UID</a> )</p>
2246
<p class="label">Example</p>
2247
<p class="example">&lt;?php
2248
.. .
2249
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2250
$vcalendar = new vcalendar( $config );
2251
$vcalendar-&gt;parse();
2252
$uid       = &quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;;
2253
if( $comp  = $vcalendar-&gt;getComponent( $uid )) {
2254
.. .
2255
}
2256
.. .
2257
</p>
2258

    
2259
<a name="getComponent5"></a>
2260
<p class="label">format 5</p>
2261
<p>
2262
Get (first/next) component based on specific property contents:
2263
</p>
2264
<dl>
2265
<dt>Supported Descriptive Component Properties
2266
<dd><a href="#CATEGORIES">CATEGORIES</a>
2267
<dd><a href="#LOCATION">LOCATION</a>
2268
<dd><a href="#PRIORITY">PRIORITY</a>
2269
<dd><a href="#RESOURCES">RESOURCES</a>
2270
<dd><a href="#STATUS">STATUS</a>
2271
<dd><a href="#SUMMARY">SUMMARY</a>
2272
<dt>Date and Time Component Properties
2273
<dd><a href="#COMPLETED">COMPLETED</a>
2274
<dd><a href="#DTEND">DTEND</a>
2275
<dd><a href="#DUE">DUE</a>
2276
<dd><a href="#DTSTART">DTSTART</a>
2277
<dt>SupportedRelationship Component Properties
2278
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
2279
<dd><a href="#CONTACT">CONTACT</a>
2280
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
2281
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>
2282
<dd><a href="#RELATED-TO">RELATED-TO</a>
2283
<dd><a href="#URL">URL</a>
2284
<dd><a href="#UID">UID</a>
2285
<dt>Change Management Component Properties
2286
<dd><a href="#CREATED">CREATED</a>
2287
<dd><a href="#DTSTAMP">DTSTAMP</a>
2288
<dd><a href="#LAST-MODIFIED">LAST-MODIFIED</a>
2289
</dl>
2290
<dl>
2291
<dt><sup>*1</sup>
2292
<dd><a href="#ATTENDEE">ATTENDEE</a> and
2293
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by protocol ex. &quot;MAILTO:chair@ical.net&quot;.
2294
</dl>
2295
<p>
2296
For the property &quot;SUMMARY&quot; ,if a search value (any case) exists within property value, a hit exists.
2297
For the other, non-date, properties an exact (strict case) match is required.
2298
</p>
2299
<p>
2300
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
2301
</p>
2302
<p>
2303
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components,
2304
use <a href="#getProperty2">getProperty</a> (Format 2).
2305
</p>
2306
<p class="format">vcalendar::getComponent( search )</p>
2307
<p class="comment">
2308
search       = (array) ( *[ propertyName =&gt; uniqueValue ]), multiple array elements are combined by &quot;OR&quot;
2309
propertyName = (string) property name, above
2310
propertyData = (string) unique property value (strict case),
2311
               date format &quot;YYYYMMDD&quot; (if any side is DATE, only dates are used),
2312
               datetime format &quot;YYYYMMDDTHHMMSS&quot;</p>
2313
<p class="label">Example</p>
2314
<p class="example">&lt;?php
2315
.. .
2316
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2317
$vcalendar = new vcalendar( $config );
2318
$vcalendar-&gt;parse();
2319
while( $comp  = $vcalendar-&gt;getComponent( array( &quot;RESOURCES&quot; =&gt; &quot;PC&quot; )) {
2320
.. .
2321
}
2322
.. .
2323
</p>
2324
<br>
2325
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2326

    
2327
<a name="newComponent"></a><h4>3.1.3.3 newComponent</h4>
2328
<P>
2329
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>)
2330
using a iCalcreator object factory-method, returning a reference to the new component.
2331
</p>
2332
<p class="label">Format</p>
2333
<p class="format">vcalendar::newComponent( componentType )</p>
2334
<p class="comment">componentType = (string) component type</p>
2335
<p class="label">Example</p>
2336
<p class="example">&lt;?php
2337
.. .
2338
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2339
$vcalendar = new vcalendar( $config );
2340
...
2341
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
2342
...
2343
</p>
2344

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

    
2348
<a name="replaceComponent"></a><h4>3.1.3.4 replaceComponent</h4>
2349
<P>
2350
Replace calendar component in vcalendar based on component property <a href="#UID">UID</a>
2351
(<a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a>).
2352
If not found, inserted last in component chain.
2353
</p>
2354
<p>
2355
In case of multiple components sharing the same UID (ex. a RECURRENCE-ID property altering a recurrence pattern), the first found is replaced
2356
 and it may lead to unpredictable result, to use with care.
2357
</p>
2358
<p>
2359
For a <a href="#VTIMEZONE">VTIMEZONE</a> component, a <a href="#TZID">TZID</a> match is required.
2360
</p>
2361
<p>
2362
A successfull replace returns bool TRUE otherwise FALSE.
2363
</p>
2364
<p class="label">Format</p>
2365
<p class="format">vcalendar::replaceComponent( component )</p>
2366
<p class="comment">component = (object) component object instance</p>
2367
<p class="label">Example</p>
2368
<p class="example">&lt;?php
2369
...
2370
$vcalendar-&gt;replaceComponent( $component );
2371
...
2372
</p>
2373

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

    
2377
<a name="selectComponents"></a><h4>3.1.3.5 selectComponents</h4>
2378
<p class="label">Format 1</p>
2379
<p>
2380
Selects  <a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> /
2381
<a href="#VFREEBUSY">VFREEBUSY</a> components from the iCalcreator object instance on based on <b>dates</b>
2382
(notice <a href="#date_restriction">date restriction</a>), based on the initial <a href="#DTSTART">DTSTART</a>
2383
property along with the <a href="#RRULE">RRULE</a>, <a href="#RDATE">RDATE</a>, <a href="#EXDATE">EXDATE</a>
2384
and <a href="#EXRULE">EXRULE</a> properties in the component.
2385
</p>
2386
<p>Requirement:</p>
2387
<ul>
2388
<li>The property <a href="#DTSTART">DTSTART</a> is required. If missing in a <a href="#VTODO">VTODO</a> component, <a href="#DTSTART">DUE</a> is used.</li>
2389
<li>If not using local date, timezone in property <a href="#DTSTART">DTSTART</a> etc. MUST be PHP complient.</li>
2390
</ul>
2391
<p>Limitations:</p>
2392
<ul>
2393
<li>The values &quot;SECONDLY&quot; / &quot;MINUTELY&quot; / &quot;HOURLY&quot; in the &quot;FREQ&quot; rule part are NOT supported.
2394
<li>If using components with properties<br>
2395
<a href="#UID">UID</a> in combination with <a href="#SEQUENCE">SEQUENCE</a> and <a href="#RECURRENCE-ID">RECURRENCE-ID</a><br>
2396
(i.e. altering an individual instance within the recurrence set),<br>
2397
the <a href="#RECURRENCE-ID">RECURRENCE-ID</a> parameter &quot;RANGE&quot; (&quot;THISANDPRIOR&quot; / &quot;THISANDFUTURE&quot;) is NOT (yet) supported.</li>
2398
<li>only one reccurrence a day</li>
2399
<li>a RDATE reccurrence will overwrite any RRULE reccurrence, on an date (Ymd) basis</li>
2400
<li>no X-CURRENT-DTEND if no DTEND (DUE) is set (below)</li>
2401
</ul>
2402
<p>
2403
Returns an array with components (events.. .) or FALSE is returned if no selected component exists.
2404
<p>
2405
<p>Added X-properties in recurrent instances of a <strong>calendar</strong> component:</p>
2406
<ul>
2407
<li>&quot;X-CURRENT-DTSTART&quot;, TEXT content, <i>&quot;Y-m-d&nbsp;[H:i:s [timezone]]&quot;</i> showing the current start date.</li>
2408
<li>&quot;X-CURRENT-DTEND&quot; alt. &quot;X-CURRENT-DUE&quot; (opt), TEXT content, <i>&quot;Y-m-d&nbsp;[H:i:s [timezone]]&quot;</i> showing the current end date.</li>
2409
<li>&quot;X-RECURRENCE&quot;, the RRULE/RDATE recurrence pattarn number (none in the recurrence start), also after an RECURRENCE-ID change</li>
2410
<li>&quot;X-OCCURENCE&quot;, contains, where applicable, single multi-day recurrence event day number (formatted as 'day X of Y')</li>
2411
</ul>
2412
<p class="format">vcalendar::selectComponents([ startYear, startMonth, startDay
2413
                [, endYear,   endMonth,   endDay
2414
                [, cType [, flat [, any [, split]]]]]])
2415
</p>
2416
<p class="comment">startYear  : (int) start year  (4*digit),   default current year
2417
             (object) start date (datetime)<sup>*</sup>
2418
startMonth : (int) start month (1-2*digit), default current month
2419
             (object) end date (datetime)<sup>*</sup>
2420
startDay   : (int) start day   (1-2*digit), default current day
2421
endYear    : (int) end year    (4*digit),   default startYear
2422
endMonth   : (int) end month   (1-2*digit), default startMonth
2423
endDay     : (int) end day     (1-2*digit), default startDay
2424
cType      : (mixed) <strong>calendar</strong> component type(-s), (string/array)
2425
                   (&quot;vevent&quot;, &quot;vtodo&quot;, &quot;vjournal&quot;, &quot;vfreebusy&quot;)
2426
             (bool) FALSE (default) =&gt; all
2427
flat       : (bool) TRUE =&gt; output : array[] (ignores split)
2428
               component where recurrence pattern exists within period
2429
             FALSE (default) =&gt; output : array[Year][Month][Day][]
2430
any        : (bool) TRUE (default) =&gt; select components with recurrence within period
2431
                    FALSE =&gt; only components that starts (DTSTART) within period
2432
split      : (bool) TRUE (default) =&gt; one component copy for every day it occurs
2433
                                      within the period
2434
                    FALSE =&gt; one occurrence of component in output array,
2435
                             start date/recurrence (start) date
2436
<sup>*</sup>When using datetime objects, other start/end arguments are ignored.
2437

    
2438
valid         flat    any     split
2439
combinations                          (defaults in upper case)
2440
           1  FALSE   TRUE    TRUE
2441
           2  FALSE   TRUE    false
2442
           3  FALSE   false   [false] (split set to false if flat=FALSE and any=false)
2443
           4  true    TRUE    [false] (split set to false if flat=true)
2444
           5  true    false   [false] (split set to false if flat=true)
2445

    
2446
If flat is set to FALSE, output array is sorted in 'Y-m-d h-i-s' asc. order.
2447
</p>
2448
<p class="label">Example</p>
2449
<p class="example">&lt;?php
2450
.. .
2451
$config     = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2452
                     &quot;directory&quot; =&gt; &quot;import&quot;,
2453
                     &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2454
$vcalendar  = new vcalendar( $config );
2455
$vcalendar-&gt;parse();
2456
$events_arr = $vcalendar-&gt;selectComponents( 2007, 11, 1, 2007, 11, 30, &quot;vevent&quot; );
2457
 // <span class="comment">select all events occurring 1-30 nov. 2007</span>
2458
foreach( $events_arr as $year =&gt; $year_arr ) {
2459
  foreach( $year_arr as $month =&gt; $month_arr ) {
2460
    foreach( $month_arr as $day =&gt; $day_arr ) {
2461
      foreach( $day_arr as $event ) {
2462
        $currddate   = $event-&gt;getProperty( &quot;x-current-dtstart&quot; );
2463
        <span class="comment">// if member of a recurrence set, returns
2464
       // array(&quot; x-current-dtstart&quot;,
2465
       // &lt;(string) date(&quot;Y-m-d&nbsp;[H:i:s][timezone/UTC&nbsp;offset]&quot;)&gt;)</span>
2466
        $startDate   = $event-&gt;getProperty( &quot;dtstart&quot; );
2467
        $summary     = $event-&gt;getProperty( &quot;summary&quot; );
2468
        $description = $event-&gt;getProperty( &quot;description&quot; );
2469
        .. .
2470
        .. .
2471
</p>
2472
<a name="selectComponents2"></a>
2473
<p class="label">format 2</p>
2474
<p>
2475
Using this format, the iCalcreator object method selects components based on specific property value(-s).
2476
</p>
2477
<dl>
2478
<dt>Supported Descriptive Component Properties
2479
<dd><a href="#CATEGORIES">CATEGORIES</a>
2480
<dd><a href="#LOCATION">LOCATION</a>
2481
<dd><a href="#PRIORITY">PRIORITY</a>
2482
<dd><a href="#RESOURCES">RESOURCES</a>
2483
<dd><a href="#STATUS">STATUS</a>
2484
<dd><a href="#SUMMARY">SUMMARY</a>
2485
<dt>Supported Relationship Component Properties
2486
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
2487
<dd><a href="#CONTACT">CONTACT</a>
2488
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
2489
<dd><a href="#RELATED-TO">RELATED-TO</a>
2490
<dd><a href="#URL">URL</a>
2491
<dd><a href="#UID">UID</a>
2492
</dl>
2493
<dl>
2494
<dt><sup>*1</sup>
2495
<dd><a href="#ATTENDEE">ATTENDEE</a> and
2496
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by (upper case) protocol like &quot;MAILTO:chair@ical.net&quot;.
2497
</dl>
2498
<p>
2499
For the property <a href="#SUMMARY">SUMMARY</a>, if a search value (any case) exists within property value, a hit is found.
2500
For the other properties an exact (strict case) match is required. Multiple search properties may coexist.
2501
</p>
2502
<p>
2503
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components,
2504
use <a href="#getProperty2">getProperty</a> (Format 2).
2505
</p>
2506
<p>
2507
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
2508
</p>
2509
<p class="format">vcalendar::selectComponents( searchArray )</p>
2510
<p>Outputs an array of matched (unique) components in <a href="#UID">UID</a> order.</p>
2511
<p class="comment">searchArray   : (array) *( propertyName =&gt; propertyValue )
2512
propertyName  : (string) above (any case)
2513
propertyValue : (string) value / (array) ( *[ (string) value] )
2514
</p>
2515
<p class="label">Example</p>
2516
<p class="example">&lt;?php
2517
.. .
2518
$config        = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2519
                        &quot;directory&quot; =&gt; &quot;import&quot;,
2520
                        &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2521
$vcalendar     = new vcalendar( $config );
2522
$vcalendar-&gt;parse();
2523
$searchArray   = array( &quot;PRIORITY&quot; =&gt; array( 1, 2, 3, 4 ));
2524
$highPrioArr   = $vcalendar-&gt;selectComponents( $searchArray );
2525
 // <span class="comment">select all components with PRIORITY set to high (1-4)</span>
2526
if( !empty( $highPrioArr )) {
2527
  $highPrioCal = new vcalendar( array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; ));
2528
  $highPrioCal-&gt;setProperty( "X-WR-CALDESC", "High priority events" );
2529
  foreach( $highPrioArr as $highPrioComponent )
2530
    $highPrioCal-&gt;setComponent( $highPrioComponent );
2531
  $highPrioCal-&gt;returnCalendar();
2532
}
2533
exit;
2534
</p>
2535
<br>
2536
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2537

    
2538
<a name="setComponent"></a><h4>3.1.3.6 setComponent</h4>
2539
<p>
2540
Replace or update component in the iCalcreator object instance.
2541
Also add a <strong>calendar</strong> component to the iCalcreator object instance
2542
when <strong>calendar</strong> component is created with the procedural (<b>non</b>-factory) method,
2543
see example <a href="#vevent_constr">VEVENT</a>, format 2.
2544
</p>
2545
<p>A successful update returns TRUE.</p>
2546
<p class="label">format 1</p>
2547
<p>Insert last in component chain.</p>
2548
<p class="format">vcalendar::setComponent( component )
2549
addComponent( component ) // <span class="comment">alias</span></p>
2550
<p class="comment">component = (object) iCalcreator component instance</p>
2551
<p class="comment">addComponent, may be removed in future versions.</p>
2552
<p class="label">format 2</p>
2553
<p>
2554
Insert/replace component with order number (1st=1, 2nd=2.. .).
2555
If replace and orderNumber is not found, component is inserted last in chain.
2556
</p>
2557
<p class="format">vcalendar::setComponent( component, orderNumber )</p>
2558
<p class="comment">component = (object) iCalcreator component instance
2559
int       = (int) order numder</p>
2560
<p class="label">format 3</p>
2561
<p>
2562
Replace component with component type and 1st alt. component order number.
2563
If orderNumber is not found, component is inserted last in chain.
2564
</p>
2565
<p class="format">vcalendar::setComponent( component, componentType [, componentSuborderNo])</p>
2566
<p class="comment">component           = (object) iCalcreator component instance
2567
componentType       = (string) component type
2568
componentSuborderNo = (int) component Suborder Number</p>
2569
<p class="label">format 4</p>
2570
<p>
2571
Replace component with <a href="#UID">UID</a>.
2572
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.
2573
If <a href="#UID">UID</a> is not found, component is inserted last in chain.
2574
</p>
2575
<p class="format">vcalendar::setComponent( component, <a href="#UID">UID</a> )</p>
2576
<p class="comment">component = (object) iCalcreator component instance</p>
2577
<p class="label">Example</p>
2578
<p class="example">&lt;?php
2579
.. .
2580
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2581
$vcalendar = new vcalendar( $config );
2582
$vcalendar-&gt;parse();
2583
$vevent    = vcalendar-&gt;getComponent( 1 ); // <span class="comment">fetch first EVENT</span>
2584
$vevent-&gt;setProperty( &quot;dtstart, 2006, 12, 24, 19, 30, 00 );
2585
                                           // <span class="comment">update <a class="ref" href="#DTSTART">DTSTART</a> property</span>
2586
$vcalendar-&gt;setComponent( $vevent, 1 );    // <span class="comment">replace first component</span>
2587
.. .
2588
</p>
2589
<br>
2590
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2591

    
2592
<a name="iCalcreator_calendar_methods"></a><h3>3.1.4 iCalcreator calendar methods</h3>
2593

    
2594
<a name="parse_merge"></a><h4>3.1.4.1 parse and merge</h4>
2595
<p>
2596
Parse iCal file(-s) or string/array <strong>calendar</strong> content into a single iCalcreator object instance (components, properties and parameters),
2597
including multiple vcalendars (within a single ICS file) parse, e.g. Oracle Calendar exports.
2598
</p>
2599
<p>
2600
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.
2601
 A remote file, URL, <b>must</b> be prefixed by &quot;http://&quot; (&quot;webcal://&quot;) and suffixed by a valid filename.!
2602
 Recommendation is to download (cache) remote file before parsing, due to execution time and control.
2603
</p>
2604
<p>
2605
If missing, component property <a href="#UID">UID</a> is created when parsing.
2606
 For that reason <a href="#Unique_id">UNIQUE_ID</a> might need to be set before parsing, Se examples below.
2607
</p>
2608
<p>
2609
Notice <a href="#date_restriction">date restriction</a>!
2610
</p>
2611
<p>
2612
If major parse error occurs (like file access error, invalid <strong>calendar</strong> file or <strong>calendar</strong> file without components), FALSE is returned.
2613
</p>
2614
<p>
2615
Minor errors like non-standard line-endings, initial and trailing empty lines
2616
 as well as files without proper end line(-s) (i.e. missing component end and/or &quot;END:CALENDAR&quot; iCal directives)
2617
 are managed.
2618
</p>
2619
<p>
2620
Non-standard iCal properties (except the <a href="#X-PROPERTY_PROP">X-properties</a>) are ignored.
2621
</p>
2622
<p class="label">Format</p>
2623
<p class="format">vcalendar::parse( [ textToParse ] )</p>
2624
<p class="comment">textToParse = (string) calendarContent
2625
                       ex. result from - file_get_contents( &quot;filename&quot;)
2626
              (array)  calendarContent
2627
                       ex. result from - file( &quot;filename&quot;, FILE_IGNORE_NEW_LINES )</p>
2628
<p class="label">parse example 1</p>
2629
<p class="example">&lt;?php
2630
.. .
2631
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2632
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2633
$vcalendar = new vcalendar( $config );
2634
$vcalendar-&gt;parse();
2635
.. .
2636
</p>
2637
<p class="label">parse example 2</p>
2638
<p class="example">&lt;?php
2639
.. .
2640
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2641
                    &quot;url&quot;       =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
2642
$vcalendar = new vcalendar( $config );
2643
$vcalendar-&gt;parse();
2644
.. .
2645
</p>
2646
<p class="label">parse example 3</p>
2647
<p class="example">&lt;?php
2648
.. .
2649
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2650
                    &quot;url&quot;       =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
2651
$vcalendar = new vcalendar( $config );
2652
...
2653
$str       = array(
2654
&quot;BEGIN:VCALENDAR&quot;,
2655
&quot;PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.22//&quot;,
2656
&quot;VERSION:2.0&quot;,
2657
&quot;BEGIN:VEVENT&quot;,
2658
&quot;DTSTART:20101224T190000Z&quot;,
2659
&quot;DTEND:20101224T200000Z&quot;,
2660
&quot;DTSTAMP:20101020T103827Z&quot;,
2661
&quot;UID:20101020T113827-1234GkdhFR@test.org&quot;,
2662
&quot;DESCRIPTION:example&quot;,
2663
&quot;END:VEVENT&quot;,
2664
&quot;END:VCALENDAR&quot;);
2665
$vcalendar-&gt;parse( $str );
2666
...
2667
</p>
2668
<p class="label">merge example</p>
2669
<p class="example">&lt;?php
2670
.. .
2671
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2672
                    &quot;directory&quot; =&gt; &quot;import&quot; );
2673
$vcalendar = new vcalendar( $config );
2674

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

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

    
2681
$vcalendar-&gt;setConfig( &quot;directory&quot;,&nbsp;&quot;export&quot; );
2682
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;icalmerge.ics&quot; );
2683
$vcalendar-&gt;saveCalendar();
2684
.. .
2685
</p>
2686
<br>
2687
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
2688

    
2689
<a name="createCalendar"></a><h4>3.1.4.2 createCalendar</h4>
2690
Generate and return <strong>calendar</strong> in a string, testing.. .?
2691
<p class="label">Format</p>
2692
<p class="format">vcalendar::createCalendar()</p>
2693
<p class="label">Example</p>
2694
<p class="example">&lt;?php
2695
.. .
2696
$str = $vcalendar-&gt;createCalendar();
2697
echo $str;
2698
...
2699
</p>
2700
<br>
2701
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
2702

    
2703
<a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
2704
<p>
2705
Redirect the iCalcreator object instance content to user browser. Filename, addressed to browser, is automatically generated if missing or not set;<br>
2706
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
2707
</p>
2708
<p>
2709
NOTE, the method no longer stops PHP script (exit), returns TRUE on success!
2710
</p>
2711
<p class="label">Format</p>
2712
<p class="format">vcalendar::returnCalendar( [ utf8Encode [, gzip [, cdType ]]] )</p>
2713
<p class="comment">utf8Encode = (bool) TRUE:  utf8 encoded output,
2714
                    FALSE: (default) no encoding
2715
gzip       = (bool) TRUE:  gzip compressed output
2716
                           Header &quot;Content-Length&quot; only sent when gzip=TRUE
2717
                    FALSE: (default) no compressing
2718
cdType     = (bool) TRUE: (default) Content-Disposition: attachment
2719
                    FALSE: Content-Disposition: inline</p>
2720
<p class="label">Example 1</p>
2721
<p class="example">&lt;?php
2722
.. .
2723
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2724
$vcalendar = new vcalendar( $config );
2725
.. .
2726
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
2727
$vevent-&gt;setProperty( &quot;dtstart&quot;, array( &quot;year&quot;  =&gt; 2007
2728
                                      , &quot;month&quot; =&gt; 4
2729
                                      , &quot;day&quot;   =&gt; 1
2730
                                      , &quot;hour&quot;  =&gt; 19 ));
2731
$vevent-&gt;setProperty( &quot;duration&quot;, 0, 0, 3 ));
2732
$vevent-&gt;setProperty( &quot;LOCATION&quot;, &quot;Central Plaza&quot; );
2733
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
2734
.. .
2735
$vcalendar-&gt;returnCalendar();
2736
exit;
2737
</p>
2738
<p class="label">Example 2</p>
2739
<p class="example">&lt;?php
2740
.. .
2741
$config     = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2742
                     &quot;directory&quot; =&gt; &quot;import&quot;,
2743
                     &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2744
$vcalendar  = new vcalendar( $config );
2745
$vcalendar-&gt;parse();
2746
$utf8Encode = TRUE;
2747
if( isset( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ) &amp;&amp;
2748
  ( FALSE !== strpos( strtolower( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ), &quot;gzip&quot; )))
2749
  $gzip     = TRUE;
2750
else
2751
  $gzip     = FALSE;
2752
$vcalendar-&gt;returnCalendar( $utf8Encode, $gzip );
2753
exit;
2754
</p>
2755
<br>
2756
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
2757

    
2758
<a name="saveCalendar"></a><h4>3.1.4.4 saveCalendar</h4>
2759
<p>
2760
Save the iCalcreator object instance in a file, using preset <a href="#Directory">directory</a> and <a href="#Filename">filename</a>.
2761
Filename is automatically generated if missing or not set;<br>
2762
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
2763
</p>
2764
<p>Return bool TRUE on success, on error FALSE.</p>
2765
<p class="label">Format</p>
2766
<p class="format">vcalendar::saveCalendar()</p>
2767
<p class="label">Example</p>
2768
<p class="example">&lt;?php
2769
.. .
2770
$vcalendar-&gt;setConfig( array( &quot;directory&quot; =&gt; &quot;depot&quot;,
2771
                              &quot;filename&quot;  =&gt; &quot;calendar.ics&quot; ));
2772
if( FALSE === $vcalendar-&gt;saveCalendar()) {
2773
&nbsp;&nbsp;echo &quot;error when saving.. .&quot;
2774
...
2775
</p>
2776
<br>
2777
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
2778

    
2779
<a name="sort"></a><h4>3.1.4.5 sort</h4>
2780
<p class="label">Format 1</p>
2781
<p>
2782
Sort created/parsed <strong>calendar</strong> components on the following (prioritized) keys:<br>
2783
1 - X-CURRENT-DTSTART - X-CURRENT-DTEND/X-CURRENT-DUE<br>
2784
&nbsp;&nbsp;&nbsp;&nbsp;(if created in iCalcreator object method <a href="#selectComponents">selectComponents</a>)<br>
2785
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>
2786
1 - <a href="#DTSTART">DTSTART</a> - <a href="#DUE">DUE</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VTODO">VTODO</a> components)<br>
2787
1 - <a href="#DTSTART">DTSTART</a> (<a href="#VJOURNAL">VJOURNAL</a> components)<br>
2788
2 - <a href="#CREATED">CREATED</a> / <a href="#DTSTAMP">DTSTAMP</a><br>
2789
3 - <a href="#UID">UID</a><br>
2790
A date value, like &quot;DTSTART;VALUE=DATE:20120717&quot;, are sorted before a datetime value.<br>
2791
<a href="#VTIMEZONE">VTIMEZONE</a> component(-s) is always placed first (ordered by <a href="#TZID">TZID</a>). The
2792
<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
2793
<a href="#createCalendar">createCalendar</a> (or <a href="#returnCalender">returnCalender</a>).
2794
<br>
2795
<a href="#VALARM">ALARM</a> sub-components, if exists, are not sorted.
2796

    
2797
</p>
2798
<p class="format">vcalendar::sort()</p>
2799
<p class="label">Example</p>
2800
<p class="example">&lt;?php
2801
.. .
2802
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2803
                    &quot;directory&quot; =&gt; &quot;import&quot;,
2804
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2805
$vcalendar = new vcalendar( $config );
2806
$vcalendar-&gt;parse();
2807
$vcalendar-&gt;sort();
2808
$vcalendar-&gt;returnCalendar();
2809
exit;
2810
</p>
2811

    
2812
<a name="sort2"></a>
2813
<p class="label">Format 2</p>
2814
<p>
2815
Sort created/parsed <strong>calendar</strong> components based on specific property values and ascending order.
2816
 If a property is not set in component, an empty sort key is used (i.e. sorted first).
2817
</p>
2818
<p class="format">vcalendar::sort( sortArgument )</p>
2819
<p class="comment">sortArgument: (string) &quot;<a href="#ATTENDEE">ATTENDEE</a>&quot; <sup>*</sup> / &quot;<a href="#CATEGORIES">CATEGORIES</a>&quot; <sup>*</sup> / &quot;<a href="#CONTACT">CONTACT</a>&quot; <sup>*</sup> / &quot;<a href="#DTSTAMP">DTSTAMP</a>&quot; /
2820
                       &quot;<a href="#LOCATION">LOCATION"</a>&quot; / &quot;<a href="#ORGANIZER">ORGANIZER</a>&quot; / &quot;<a href="#PRIORITY">PRIORITY</a>&quot; /
2821
                       &quot;<a href="#RESOURCES">RESOURCES</a>&quot; <sup>*</sup> / &quot;<a href="#STATUS">STATUS</a>&quot; / &quot;<a href="#SUMMARY">SUMMARY</a>&quot; / &quot;<a href="#URL">URL</a>&quot; / &quot;<a href="#UID">UID</a>&quot; <sup>**</sup>.
2822
<p class="comment"><sup>*) </sup> 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>
2823
<p class="comment"><sup>**)</sup> For multiple components with the same <a href="#UID">UID</a>, components with <a href="#RECURRENCE-ID">RECURRENCE-ID</a> / <a href="#SEQUENCE">SEQUENCE</a> set are sorted first (on asc. values) and components without <a href="#RECURRENCE-ID">RECURRENCE-ID</a> last.</p>
2824
<br>
2825
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
2826

    
2827
<a name="useCachedCalendar"></a><h4>3.1.4.6 useCachedCalendar</h4>
2828
<p>
2829
If a recent version of (non-empty and saved) <strong>calendar</strong> file exists, an HTTP redirect is sent otherwise FALSE is returned.
2830
</p>
2831
<p>
2832
NOTE, the method no longer stops PHP script (exit), returns bool TRUE on success, FALSE on error!
2833
</p>
2834
<p class="label">Format</p>
2835
<p class="format">vcalendar::useCachedCalendar( [ timeout [, cdType ]] )</p>
2836
<p class="comment">timeout   = (int) default 3600 sec
2837
cdType    = (bool) TRUE: (default) Content-Disposition: attachment
2838
                   FALSE: Content-Disposition: inline</p>
2839
<p class="label">Example</p>
2840
<p class="example">&lt;?php
2841
.. .
2842
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
2843
$vcalendar-&gt;setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
2844
$vcalendar-&gt;useCachedCalendar();
2845
...
2846
</p>
2847
<br>
2848
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
2849

    
2850

    
2851
<a name="iCalcreatorVersion"></a><h4>3.1.4.7 iCalcreatorVersion</h4>
2852
<p>
2853
This static class method returns the iCalcreator class version number (2.22+).
2854
</p>
2855
<p>
2856
There is also a <em>PHP</em> constant &quot;ICALCREATOR_VERSION&quot; (all versions).
2857
</p>
2858
<p class="label">Format</p>
2859
<p class="format">vcalendar::iCalcreatorVersion()</p>
2860

    
2861
<br>
2862
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
2863

    
2864

    
2865

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

    
2868
<a name="configKeys"></a><h4>3.1.5.1 configuration keys</h4>
2869
<p>All configuration keys (allowEmpty, compsInfo etc.) case independent.</p>
2870
<table>
2871
<tr>
2872
<td class="bl bb">key</td>
2873
<td class="bl bb"><strong>calendar</strong></td>
2874
<td class="bl bb">component</td>
2875
<td class="bl bb">remark</td>
2876
</tr>
2877
<tr>
2878
<td class="bl bb"><a class="ref" href="#allowEmpty">allowEmpty</a></td>
2879
<td class="bl bb center">*</td>
2880
<td class="bl bb center">*</td>
2881
<td class="bl bb ref">&nbsp;</td>
2882
</tr>
2883
<tr>
2884
<td class="bl bb"><a class="ref" href="#Compsinfo">Compsinfo</a></td>
2885
<td class="bl bb center">*</td>
2886
<td class="bl bb center">*</td>
2887
<td class="bl bb ref">getConfig only</td>
2888
</tr>
2889
<tr>
2890
<td class="bl bb"><a class="ref" href="#Delimiter">Delimiter</a></td>
2891
<td class="bl bb center">*</td>
2892
<td class="bl bb">&nbsp;</td>
2893
<td class="bl bb ref">&nbsp;</td>
2894
</tr>
2895
<tr>
2896
<td class="bl bb"><a class="ref" href="#Directory">Directory</a></td>
2897
<td class="bl bb center">*</td>
2898
<td class="bl bb">&nbsp;</td>
2899
<td class="bl bb ref">&nbsp;</td>
2900
</tr>
2901
<tr>
2902
<td class="bl bb"><a class="ref" href="#Filename">Filename</a></td>
2903
<td class="bl bb center">*</td>
2904
<td class="bl bb">&nbsp;</td>
2905
<td class="bl bb ref">&nbsp;</td>
2906
</tr>
2907
<tr>
2908
<td class="bl bb"><a class="ref" href="#Dirfile">Dirfile</a></td>
2909
<td class="bl bb center">*</td>
2910
<td class="bl bb">&nbsp;</td>
2911
<td class="bl bb ref">getConfig only</td>
2912
</tr>
2913
<tr>
2914
<td class="bl bb"><a class="ref" href="#Filesize">Filesize</a></td>
2915
<td class="bl bb center">*</td>
2916
<td class="bl bb">&nbsp;</td>
2917
<td class="bl bb ref">getConfig only</td>
2918
</tr>
2919
<tr>
2920
<td class="bl bb"><a class="ref" href="#Format">Format</a></td>
2921
<td class="bl bb center">*</td>
2922
<td class="bl bb">&nbsp;</td>
2923
<td class="bl bb ref">&nbsp;</td>
2924
</tr>
2925
<tr>
2926
<td class="bl bb"><a class="ref" href="#Language">Language</a></td>
2927
<td class="bl bb center">*</td>
2928
<td class="bl bb center">*</td>
2929
<td class="bl bb ref">&nbsp;</td>
2930
</tr>
2931
<tr>
2932
<td class="bl bb"><a class="ref" href="#NewlineChar">NewlineChar</a></td>
2933
<td class="bl bb center">*</td>
2934
<td class="bl bb center">*</td>
2935
<td class="bl bb ref">&nbsp;</td>
2936
</tr>
2937
<tr>
2938
<td class="bl bb"><a class="ref" href="#setPropertyNames">setPropertyNames</a></td>
2939
<td class="bl bb center">&nbsp;</td>
2940
<td class="bl bb center">*</td>
2941
<td class="bl bb ref">getConfig only</td>
2942
</tr>
2943
<tr>
2944
<td class="bl bb"><a class="ref" href="#dTZID">TZID</a></td>
2945
<td class="bl bb center">*</td>
2946
<td class="bl bb center">*</td>
2947
<td class="bl bb ref">&nbsp;</td>
2948
</tr>
2949
<tr>
2950
<td class="bl bb"><a class="ref" href="#Unique_id">Unique_id</a></td>
2951
<td class="bl bb center">*</td>
2952
<td class="bl bb center">*</td>
2953
<td class="bl bb ref">&nbsp;</td>
2954
</tr>
2955
<tr>
2956
<td class="bl bb"><a class="ref" href="#configURL">URL</a></td>
2957
<td class="bl bb center">*</td>
2958
<td class="bl bb">&nbsp;</td>
2959
<td class="bl bb ref">&nbsp;</td>
2960
</tr>
2961
</table>
2962
<br>
2963
<br>
2964
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
2965

    
2966
<a name="getConfig"></a><h4>3.1.5.2 getConfig</h4>
2967
<p class="format">vcalendar::getConfig( [ key ] )</p>
2968
<p class="comment">key = (string) config key</p>
2969
<p class="label">Example 1</p>
2970
<p class="example">&lt;?php
2971
.. .
2972
$filename = $vcalendar-&gt;getConfig( &quot;filename&quot; );
2973
.. .
2974
</p>
2975
In this example, notice <a href="#Filename">Filename</a>
2976
<br>
2977
<p class="label">Example 2</p>
2978
<p class="example">&lt;?php
2979
.. .
2980
$config = $vcalendar-&gt;getConfig();
2981
.. .
2982
</p>
2983
<p class="comment">Output= array( string key =&gt; mixed value
2984
           *[, string key =&gt; mixed value] )</p>
2985
<br>
2986
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
2987

    
2988
<a name="initConfig"></a><h4>3.1.5.3 calendar/component initialization</h4>
2989
<p class="label">Format</p>
2990
<p>Create a new iCalcreator object instance.</p>
2991
<p class="format">vcalendar::vcalendar( [ config ] )</p>
2992
<p class="comment">config = (array) ( *[, key =&gt; value] )
2993
key    = (string) config key
2994
value  = (mixed) config value</p>
2995
<p class="label">Example 1</p>
2996
<p class="example">&lt;?php
2997
.. .
2998
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
2999
$vcalendar = new vcalendar( $config );
3000
.. .
3001
</p>
3002
<p>
3003
Do <b>NOT</b> set <a href="#Directory">directory</a>/<a href="#Filename">filename</a> in vcalendar constructor, due to inability to detect error (FALSE) config return.
3004
</p>
3005
<p>Create a new <strong>calendar</strong> component.</p>
3006
<p class="format">vcalendar::component( [ config ] )</p>
3007
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
3008
key    = (string) config key
3009
value  = (mixed) config value</p>
3010
<p class="label">Example 2</p>
3011
<p class="example">&lt;?php
3012
.. .
3013
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
3014
$vevent = new vevent( $config );
3015
.. .
3016
</p>
3017
<p class="label">Example 3</p>
3018
<p class="example">&lt;?php
3019
.. .
3020
$config = $vcalendar-&gt;getConfig();
3021
$vevent = new vevent( $config );
3022
.. .
3023
</p>
3024
<p>Only component relevant configuration are set. If using the <a href="#newComponent">newComponent</a> function, configuration is set automatically.</p>
3025
<br>
3026
<br>
3027
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3028

    
3029
<a name="setConfig"></a><h4>3.1.5.4 setConfig</h4>
3030
<p>A successful &quot;setConfig&quot; returns TRUE.</p>
3031
<p class="label">Format 1</p>
3032
<p class="format">vcalendar::setConfig( [ config ] )</p>
3033
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
3034
key    = (string) config key
3035
value  = (mixed) config value</p>
3036
<p class="label">Example 1</p>
3037
<p class="example">&lt;?php
3038
.. .
3039
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3040
                    &quot;directory&quot; =&gt; &quot;import&quot;,
3041
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
3042
$vcalendar = new vcalendar();
3043
$vcalendar-&gt;setConfig( $config );
3044
.. .
3045
</p>
3046
<p class="label">Example 2</p>
3047
<p class="example">&lt;?php
3048
.. .
3049
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
3050
$vevent = new vevent();
3051
$vevent-&gt;setConfig( $config );
3052
.. .
3053
</p>
3054
<p class="label">Format 2</p>
3055
<p class="format">vcalendar::setConfig( key, value )</p>
3056
<p class="comment">key    = (string) config key
3057
value  = (mixed) config value</p>
3058
<p class="label">Example 1</p>
3059
<p class="example">&lt;?php
3060
.. .
3061
$vcalendar = new vcalendar();
3062
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
3063
.. .
3064
</p>
3065
<p class="label">Example 2</p>
3066
<p class="example">&lt;?php
3067
.. .
3068
$vevent = new vevent();
3069
$vevent-&gt;setConfig( &quot;unique_id&quot;, &quot;kigkonsult.se&quot; );
3070
.. .
3071
</p>
3072
<br>
3073
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3074

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

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

    
3087
<a name="Compsinfo"></a><h4>3.1.5.6 Component information</h4>
3088
<p>Only to use with iCalcreator object method getConfig.</p>
3089
<p>
3090
Get information about the iCalcreator object instance components. Returns array with basic information
3091
about all components (in array format) within the iCalcreator object instance.
3092
</p>
3093
<p class="comment">Output   = array ( *compinfo )
3094
compinfo = array ( &quot;ordno&quot; =&gt; int ordno,
3095
                   // <span class="commsnt">order number (1st=1, 2nd=2..)</span>
3096
                 , &quot;type&quot;  =&gt; string type
3097
                   // <span class="comment">component type (vevent, vtodo.. .</span>
3098
                 , &quot;uid&quot;   =&gt; string uid
3099
                   // <span class="comment">component <a href="#UID">UID</a> (not for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a>)</span>
3100
                 , &quot;props&quot; =&gt;
3101
                     array( *[ propertyName =&gt; Property count ])
3102
                   // <span class="comment">for every set property</span>
3103
                 , &quot;sub&quot;   =&gt; array( *compinfo ))
3104
                   // <span class="comment">if subcomponents exists, an array for each subcomponent</span></p>
3105
<p class="label">Example</p>
3106
<p class="example">&lt;?php
3107
.. .
3108
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3109
                    &quot;directory&quot; =&gt; &quot;import&quot;,
3110
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
3111
$vcalendar = new vcalendar( $config );
3112
$vcalendar-&gt;parse();
3113
$compsinfo = $vcalendar-&gt;getConfig( &quot;compsinfo&quot; );
3114
foreach( $compsinfo as compinfo) {
3115
&nbsp;&nbsp;echo &quot; order number : &quot;.$compinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3116
&nbsp;&nbsp;echo &quot; type : &quot;.$compinfo[&quot;type&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3117
&nbsp;&nbsp;echo &quot; UID : &quot;.$compinfo[&quot;uid&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3118
&nbsp;&nbsp;foreach( $compinfo[&quot;props&quot;] as $propertyName =&gt; $propertyCount )
3119
&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;  $propertyName = $propertyCount&quot;;
3120
&nbsp;&nbsp;if( is_array( $compinfo[&quot;sub&quot;] )) {
3121
&nbsp;&nbsp;&nbsp;&nbsp;foreach( $compinfo[&quot;sub&quot;] as $subcompinfo ) {
3122
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; order number : &quot;.$subcompinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3123
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* .. dito if subcomponents exists .. . */
3124
&nbsp;&nbsp;&nbsp;&nbsp;}
3125
&nbsp;&nbsp;}
3126
}
3127
.. .
3128
</p>
3129
<br>
3130
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3131

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

    
3140
<a name="Directory"></a><h4>3.1.5.8 Directory</h4>
3141
<p>
3142
Local directory to store/read iCal files.
3143
</p>
3144
<p>
3145
Default &quot;<b>.</b>&quot;.
3146
</p>
3147
<p>
3148
Directory <b>must</b> be set BEFORE <a href="#Filename">filename</a> and <b>must</b> exist and be writeable otherwise FALSE is returned.
3149
If set using an config array and together with <a name="Filename"><u>Filename</u></a>, Directory are set automatically first.
3150
When setting directory, the <em>PHP</em> realpath function is applied to speed up parse/saveCalendar methods.
3151
When setting Directory, any previously set <a href="#configURL">URL</a> is removed.
3152
</p>
3153
<p class="label">Example</p>
3154
<p class="example">&lt;?php
3155
...
3156
$dir  = 'test';
3157
if( FALSE === $vcalendar-&gt;setConfig( array( 'directory' => $dir )))
3158
  die( &quot;Invalid directory $dir&quot; );
3159
...
3160
</p>
3161
<p>
3162
For temporary calendar files, you may set directory/<a href="#Filename">filename</a> using <em>PHP</em> functions sys_get_temp_dir() and tempnam().
3163
</p>
3164
<p>
3165
Do <b>NOT</b> set directory/<a href="#Filename">filename</a> in <a href="#vcalendar_constr">vcalendar</a> constructor, due to inability to detect error (FALSE) config return.
3166
</p>
3167
<br>
3168
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3169

    
3170
<a name="Dirfile"></a><h4>3.1.5.9 Dirfile</h4>
3171
<p>
3172
Only available in iCalcreator object method getConfig, returning (string) <a href="#Directory">directory</a>, <a href="#Delimiter">delimiter</a> and <a href="#Filename">filename</a>.
3173
</p>
3174
<br>
3175
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3176

    
3177
<a name="Fileinfo"></a><h4>3.1.5.10 Fileinfo</h4>
3178
<p>
3179
Only available in iCalcreator object method getConfig, giving information in array format about <a href="#Directory">directory</a>,
3180
<a href="#Filename">filename</a> and <a href="#Filesize">filesize</a>.
3181
</p>
3182
<p class="label">Example</p>
3183
<p class="example">&lt;?php
3184
.. .
3185
$fileinfo = $vcalendar-&gt;getConfig( &quot;fileinfo&quot; );
3186
.. .
3187
</p>
3188
<p class="comment">output = array( &lt;directory&gt;, &lt;filename&gt;, &lt;filesize&gt; )</p>
3189
<br>
3190
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3191

    
3192
<a name="Filename"></a><h4>3.1.5.11 Filename</h4>
3193
<p>iCal local file name, default created like (if not set):</p>
3194
<p class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot;;</p>
3195
<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>
3196
<p>
3197
If not set, filename is created when requested, ex. in iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or getConfig(&quot;filename&quot;).
3198
</p>
3199
<p>
3200
Local filename <b>must</b> be set AFTER setting directory (and opt. delimiter)!
3201
Filename (and opt. directory) <b>must</b> be readable/writeable otherwise FALSE is returned.
3202
</p>
3203
<p class="label">Example</p>
3204
<p class="example">&lt;?php
3205
...
3206
$dir  = 'test';
3207
if( FALSE === $vcalendar-&gt;setConfig( array( &quot;directory&quot; =&gt; $dir )))
3208
  die( &quot;Error when config directory $dir&quot; );
3209
$file = 'temp.ics';
3210
if( FALSE === $vcalendar-&gt;setConfig( array( &quot;filename&quot; =&gt; $file )))
3211
  die( &quot;Error when config filename $file&quot; );
3212
...
3213
</p>
3214
<p>
3215
For temporary calendar files, you may set <a href="#Directory">directory</a>/filename</a> using <em>PHP</em> functions sys_get_temp_dir() and tempnam().
3216
</p>
3217
<p>
3218
Do <b>NOT</b> set <a href="#Directory">directory</a>/filename</a> in <a href="#vcalendar_constr">vcalendar</a> constructor, due to inability to detect error (FALSE) config return.
3219
</p>
3220
<br>
3221
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3222

    
3223
<a name="Filesize"></a><h4>3.1.5.12 Filesize</h4>
3224
<p>
3225
Only when getting configuration (using iCalcreator object method getConfig).<br>
3226
Returns the size of the file in bytes, to be invoked<br>
3227
- after &quot;saveCalendar()&quot;<br>
3228
or<br>
3229
- after a &quot;setConfig( &quot;directory&quot; / &quot;filename&quot; )&quot; and before/after &quot;parse()&quot;.<br>
3230
Getting the filesize for a remote file (URL) will always return zero.
3231
</p>
3232
<br>
3233
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3234

    
3235
<a name="Format"></a><h4>3.1.5.13 Format</h4>
3236
<p>Format for the iCalcreator object instance output, &quot;iCal&quot;/&quot;xCal&quot;, any case.</p>
3237
<p>
3238
&quot;iCal&quot; is default ([RFC5545]), &quot;xCal&quot; force xml formatted output, according to<br>
3239
&quot;draft-ietf-calsch-many-xcal-01.txt&quot; (now obsolete).
3240
</p>
3241
<p>
3242
For converting to and from XML, according to rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;,use functions<br>
3243
- <a href="#iCal2XML">iCal2XML</a> converts an iCalcreator object instance to XML<br>
3244
- <a href="#XML2iCal">XML2iCal</a> converts XML (string/file) to an iCalcreator object instance.
3245
</p>
3246
<br>
3247
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3248

    
3249
<a name="Language"></a><h4>3.1.5.14 Language</h4>
3250
<p>
3251
Language for the iCalcreator object instance and component TEXT value properties as defined in [RFC5646].
3252
</p>
3253
<p>
3254
Default empty.
3255
</p>
3256
<p>
3257
If NOT set in TEXT property parameters, language from component instance &quot;setConfig( &quot;language&quot;, ..)&quot; method will be used, if set,
3258
otherwise language from <strong>calendar</strong> method &quot;setConfig( &quot;language&quot;, ..)&quot; will be used, if set.
3259
</p>
3260
<p>
3261
The <strong>calendar</strong> property PRODID is always recreated when setting (<strong>calendar</strong>) language
3262
 (, note <a href="#Unique_id">Unique_id</a>, below).
3263
</p>
3264
<br>
3265
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3266

    
3267
<a name="NewlineChar"></a><h4>3.1.5.15 NewlineChar</h4>
3268
<p>
3269
Character(s) used for carriage return + line feed (CR+LF).
3270
</p>
3271
<p>
3272
Default &quot;\r\n&quot; as defined in [RFC5545].
3273
</p>
3274
<br>
3275
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3276

    
3277
<a name="setPropertyNames"></a><h4>3.1.5.16 setPropertyNames</h4>
3278
<p>
3279
Returns array of property names for all set properties in component. &quot;X-PROP&quot; will be used when <a href="#X-PROPERTY_PROP">X-properties</a> are set.
3280
</p>
3281
<br>
3282
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3283

    
3284
<a name="dTZID"></a><h4>3.1.5.17 TZID</h4>
3285
<p>
3286
General timezone, will be used if no TZID parameter is supplied when setting <a href="#DTSTART">DTSTART</a>,
3287
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>, a TZID <b>auto completion</b>.
3288
</p>
3289
<p>
3290
Default empty.
3291
</p>
3292
<p>
3293
Note, some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
3294
and vtimezone component property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>
3295
(to be set manually, examine also the <a href="#createTimezone">createTimezone</a> function).
3296
</p>
3297
<br>
3298
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3299

    
3300
<a name="Unique_id"></a><h4>3.1.5.18 Unique_id</h4>
3301
<p>
3302
&quot;Unique_id&quot; is used in <strong>calendar</strong> property PRODID and component property <a href="#UID">UID</a>,
3303
both created automatically (, if not setting <a href="#UID">UID</a> manually.
3304
</p>
3305
<p class="quotes">PRODID
3306
The identifier is RECOMMENDED to be the identical syntax to the [RFC 822] addr-spec.
3307
A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which.. .
3308
</p>
3309
<p>
3310
Default <b>AUTOMATICALLY</b> generated by using <em>PHP</em> function gethostbyname( $_SERVER[&quot;SERVER_NAME&quot;] )
3311
when running in a web server environment or &quot;localhost&quot; when using command line interface.
3312
Used when setting other (domain) name than server name.
3313
</p>
3314
<p>
3315
The <strong>calendar</strong> property PRODID is always recreated when setting unique_id.
3316
</p>
3317
<p>
3318
If missing, the component property <a href="#UID">UID</a> is created at first use of iCalcreator object methods <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a> or <a href="#saveCalendar">saveCalendar</a>
3319
</p>
3320
<p>
3321
A strong recommendation is <b>always</b> to set unique_id, creating a new iCalcreator object or component instance,
3322
to ensure accurate creation of all components <a href="#UID">UID</a> property, also before <a href="#parse">parse</a>, in case of missing <a href="#UID">UID</a>.
3323
</p>
3324
<br>
3325

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

    
3328
<a name="configURL"></a><h4>3.1.5.19 URL</h4>
3329
<p>
3330
When reading remote files or resources with URL (using the <a href="#parse">parse()</a> method),
3331
protocol &quot;http&quot; (&quot;webcal&quot;) and &quot;https&quot; are supported.
3332
</p>
3333
<p>
3334
When setting URL, the previously set <a href="#Directory">Directory</a> is removed.
3335
</p>
3336
<p>
3337
A remote file is identified by the file suffix &quot;.ics&quot;, otherwise the URL is classified as a resource.
3338
When setting URL to a remote iCal <u>file</u>, only directory need to be (re-)set,
3339
filename remains unchanged (i.e. 1. set URL, 2. parse, 3. set directory, 4. saveCalendar).
3340
The URL remote file <u>file</u> part can be retrieved by the vcalendar method getConfig( &quot;filename&quot; ).
3341
When using a resource, filename is unset (note <a href="#Filename">filename</a>, above).
3342
</p>
3343
<p class="label">Example</p>
3344
<p>Parse of remote file, then local save in &quot;depot&quot; folder, using original filename</p>
3345
<p class="example">&lt;?php
3346
.. .
3347
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3348
                    &quot;url&quot;       =&gt; &quot;http://www.iCal.net/depot/calendar.ics&quot; );
3349
$vcalendar = new vcalendar( $config );
3350
$vcalendar-&gt;parse();
3351
$vcalendar-&gt;sort();
3352
.. .
3353
.. .
3354
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
3355
$vcalendar-&gt;saveCalendar();
3356
.. .
3357
</p>
3358
<br>
3359
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3360

    
3361
<a name="Calendar_component_object_property_function_list"></a><h2>3.2 Calendar component property method list</h2>
3362
<p>
3363
All iCalcreator component object property methods for get/set data.<br>
3364
For property format in detail, see
3365
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
3366
</p>
3367
<a name="DATE_WITH_UTC_TIME"></a>
3368
<span class="label">Notice:</span> for properties and DATE-TIME with <b>UTC</b> time.
3369
<p class="quotes">RFC2445:
3370
The date with UTC time, or absolute time,
3371
is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90),
3372
the UTC designator, appended to the time value.
3373
For example, the following represents January 19, 1998, at 0700 UTC:
3374
</p>
3375
<p class="quotes">DTSTART:19980119T070000Z</p>
3376
<p class="quotes">The <a href="#TZID">TZID</a> property parameter MUST <b>NOT</b> be applied to DATE-TIME properties
3377
whose time values are specified in UTC.
3378
</p>
3379
<p>
3380
<a name="date_restriction"></a>
3381
<span class="label">Notice:</span> date limitation.<br>
3382
Due to a limitation in <em>PHP</em> date functions, e.g. <span class="format">mktime</span>,
3383
<span class="format">strtotime</span>, a date (e.g. while setting <a href="#DTSTART">DTSTART</a> property)
3384
before &quot;January 1 1970 00:00:00 GMT&quot; may force a <em>PHP</em> date function to generate an error or set date to &quot;January 1 1970&quot;.
3385
</p>
3386
<a name="deleteProperty_PROP"></a><h3>3.2.1 deleteProperty</h3>
3387
Generic iCalcreator object instance delete property method,simplifying removal of <strong>calendar</strong> properties.<br>
3388
FALSE is returned if no property exists or when end-of-properties at consecutive function calls.
3389
<p class="label">Format</p>
3390
<p class="format">calendarComponent::deleteProperty( [ PropName [, order ] )</p>
3391
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
3392
                    unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
3393
order    = (int)    if missing 1st/next occurrence,
3394
                    used with multiply (property) occurrences</p>
3395
<p class="label">Example</p>
3396
<p>Remove all COMMENT properties in first event component.</p>
3397
<p class="example">&lt;?php
3398
.. .
3399
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3400
                    &quot;directory&quot; =&gt; &quot;import&quot;,
3401
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
3402
$vcalendar = new vcalendar( $config );
3403
$vcalendar-&gt;parse();
3404
$event     = $vcalendar-&gt;getComponent( &quot;vevent&quot; );
3405
while( $event-&gt;deleteProperty( &quot;comment&quot; ))
3406
&nbsp;&nbsp;continue;
3407
.. .
3408
</p>
3409
<br>
3410
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3411

    
3412
<a name="getProperty_PROP"></a><h3>3.2.2 getProperty</h3>
3413
<a name="geoLocation_PROP"></a>
3414
<p>Generic iCalcreator component get property method, simplifying fetch of properties.</p>
3415
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
3416
<p>Using the non-standard directive &quot;GEOLOCATION&quot;, iCalcreator returns output supporting<br>
3417
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
3418
 by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
3419
 (only if <a href="#GEO">GEO</a> is set).
3420
</p>
3421
<p class="label">Format</p>
3422
<p class="format">calendarComponent::getProperty( PropName [, order [, complete ]] )</p>
3423
<p class="comment">propName = (string) case independent, [RFc5545] component property names,
3424
                    unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
3425
order    = (int)    if missing/FALSE 1st/next occurrence,
3426
                    otherwise with multiply occurrences (1st=1, 2nd=2.. .)
3427
complete - (bool)   FALSE (default): output only property value
3428
                    TRUE           : output =
3429
                             array(&quot;value&quot; =&gt; &lt;value&gt;
3430
                                  ,&quot;params&quot;=&gt; &lt;parameter array&gt;)</p>
3431
<p class="label">Example</p>
3432
<p class="example">&lt;?php
3433
.. .
3434
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3435
                    &quot;directory&quot; =&gt; &quot;import&quot;,
3436
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
3437
$vcalendar = new vcalendar( $config );
3438
$vcalendar-&gt;parse();
3439
while( $vevent = $vcalendar-&gt;getComponent( &quot;vevent&quot; )) {
3440
  $dtstart     = $vevent-&gt;getProperty( &quot;dtstart&quot; );      // <span class="comment">one occurrence</span>
3441
  $description = $vevent-&gt;getProperty( &quot;description&quot; );  // <span class="comment">one occurrence</span>
3442
  while( $comment = $vevent-&gt;getProperty( &quot;comment&quot; )) { // <span class="comment">MAY occur more than once</span>
3443
  .. .
3444
  }
3445
}
3446
.. .
3447
</p>
3448
<br>
3449
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3450

    
3451
<a name="parse"></a><h3>3.2.3 parse</h3>
3452
<p>
3453
Parse iCal component property text from a string or an array.
3454
Each string/array row must be strict RFC5545 formatted, i.e. begin with a property name.
3455
</p>
3456
<p>
3457
Complete <a href="#VALARM">ALARM</a>s, all properties included, in array format and
3458
first array row as &quot;BEGIN:VALARM&quot;, last as &quot;END:VALARM&quot;
3459
as well as <a href="#VTIMEZONE">TIMEZONE</a> and standard/daylight subcomponents.
3460
</p>
3461
<p>
3462
If major parse error occurs (like invalid <strong>calendar</strong> structure or no <strong>calendar</strong> components), FALSE is returned.
3463
</p>
3464
<p>
3465
Minor errors like non-standard line-endings, initial and trailing empty lines
3466
 as well as files without proper end line(-s) (i.e. missing component end iCal directives)
3467
 are managed.
3468
</p>
3469
<p>
3470
Except the <a href="#X-PROPERTY_PROP">X-properties</a>, non-standard properties are ignored.
3471
</p>
3472
<p class="label">Format</p>
3473
<p class="format">calendarComponent::parse( propertyText )</p>
3474
<p class="comment">propertyText = (string) [RFC5545] formatted property,
3475
               (array)  [RFC5545] formatted properties,
3476
               property name <b>must</b> start string / rows(-s)</p>
3477
<p class="label">example</p>
3478
<p class="example">&lt;?php
3479
.. .
3480
$e = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
3481
$e-&gt;parse( &quot;DTSTAMP:19970324T1200Z&quot; );
3482
$e-&gt;parse( &quot;SEQUENCE:0&quot; );
3483
$e-&gt;parse( &quot;ORGANIZER:MAILTO:jdoe@host1.com&quot; );
3484
$e-&gt;parse( array(
3485
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com&quot;,
3486
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host2.com&quot;,
3487
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host3.com&quot;,
3488
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host4.com&quot; ));
3489
$e-&gt;parse( &quot;DTSTART:19970324T123000Z&quot; );
3490
$e-&gt;parse( &quot;DTEND:19970324T210000Z&quot; );
3491
$e-&gt;parse( &quot;CATEGORIES:MEETING,PROJECT&quot; );
3492
$e-&gt;parse( &quot;CLASS:PUBLIC&quot; );
3493
$e-&gt;parse( &quot;SUMMARY:Calendaring Interoperability Planning Meeting&quot; );
3494
$e-&gt;parse( &quot;STATUS:DRAFT&quot; );
3495
$e-&gt;parse( &quot;DESCRIPTION:Project xyz Review Meeting Minutes\\n &quot;
3496
         . &quot;Agenda\\n &quot;
3497
         . &quot;1. Review of project version 1.0 requirements.\\n &quot;
3498
         . &quot;2. Definition of project processes.\\n &quot;
3499
         . &quot;3. Review of project schedule.\\n &quot;
3500
         . &quot;Participants: John Smith, Jane Doe, Jim Dandy\\n &quot;
3501
         . &quot;- It was decided that the requirements need to be signed off by \\n &quot;
3502
         . &quot;product marketing.\\n &quot;
3503
         . &quot;- Project processes were accepted.\\n &quot;
3504
         . &quot;- Project schedule needs to account for scheduled holidays and employee\\n &quot;
3505
         . &quot; vacation time. Check with HR for specific dates.\\n &quot;
3506
         . &quot;- New schedule will be distributed by Friday.\\n &quot;
3507
         . &quot;- Next weeks meeting is cancelled. No meeting until 3/23.&quot; );
3508
$e-&gt;parse( &quot;LOCATION:LDB Lobby&quot; );
3509
$e-&gt;parse( &quot;ATTACH;FMTTYPE=application/postscript:ftp://xyz.com/pub/conf/bkgrnd.ps&quot; );
3510
$e-&gt;parse( array( &quot;BEGIN:VALARM&quot;
3511
                , &quot;ACTION:AUDIO&quot;
3512
                , &quot;TRIGGER;VALUE=DATE-TIME:19970224T070000Z&quot;
3513
                , &quot;ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud&quot;
3514
                , &quot;REPEAT:4&quot;
3515
                , &quot;DURATION:PT1H&quot;
3516
                , &quot;X-alarm:non-standard ALARM property&quot;
3517
                , &quot;END:VALARM&quot; ));
3518
$e-&gt;parse( &quot;X-xomment:non-standard property will be displayed, comma escaped&quot;);
3519
.. .
3520
</p>
3521
<br>
3522
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3523

    
3524

    
3525
<a name="setProperty_PROP"></a><h3>3.2.4 setProperty</h3>
3526
<p>
3527
Generic iCalcreator component object set property method, simplifying insert of properties. For properties where
3528
multiple occurrences are allowed, last parameter is an index, implementing replaceProperty functionality.
3529
</p>
3530
<p>A successful update returns TRUE.</p>
3531
<p class="label">Format</p>
3532
<p class="format">calendarComponent::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
3533
<p class="comment">propName  = (string) case independent, [RFC5545] component property names,
3534
                    unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY_PROP">X-property</a>.
3535
Proparg_n = (mixed) property content
3536
            Last property argument is a (optional) property dependent parameters
3537
            array( *[(string) key =&gt; (string) value ] ).
3538
            A non-standard (, experimental) parameter key MUST be prefixed by &quot;X-&quot;.
3539
</p>
3540
<p class="label">Example</p>
3541
<p class="example">&lt;?php
3542
.. .
3543
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
3544
$vevent-&gt;setProperty( &quot;dtstart&quot;
3545
                    , array(&quot;year&quot;=&gt;2007,&quot;month&quot;=&gt;4,&quot;day&quot;=&gt;1,&quot;hour&quot;=&gt;19));
3546
$vevent-&gt;setProperty( &quot;duration&quot;, 0, 0, 3 ));
3547
$vevent-&gt;setProperty( &quot;LOCATION&quot;, &quot;Central Plaza&quot; );
3548
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
3549
.. .
3550
</p>
3551
<br>
3552
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3553

    
3554

    
3555
<a name="ACTION"></a><h3>3.2.5 ACTION</h3>
3556
<p>
3557
This property defines the action to be invoked when an <a href="#VALARM">VALARM</a> is triggered,
3558
<br> &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;.
3559
This property is REQUIRED and MUST NOT occur more than once. (&quot;PROCEDURE&quot; is deprecated in [RFC5545].)
3560
</p>
3561
<h5>Create ACTION</h5>
3562
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3563
<p class="label">Format</p>
3564
<p class="format">calendarComponent::createAction()</p>
3565
<p class="label">Example</p>
3566
<p class="example">&lt;?php
3567
.. .
3568
$str = $component-&gt;createAction();
3569
.. .
3570
</p>
3571
<h5>Delete ACTION</h5>
3572
<p>Remove ACTION from component.</p>
3573
<p class="label">Format</p>
3574
<p class="format">calendarComponent::deleteProperty( &quot;Action&quot; )</p>
3575
<p class="label">Example</p>
3576
<p class="example">&lt;?php
3577
.. .
3578
$valarm-&gt;deleteProperty( &quot;Action&quot; );
3579
.. .
3580
</p>
3581
<h5>Get ACTION</h5>
3582
<p>If set, returns property value, otherwise FALSE.</p>
3583
<p class="label">Format 1</p>
3584
<p class="format">calendarComponent::getProperty( &quot;Action&quot; )</p>
3585
<p class="comment">output = actionValue<sup>1</sup>
3586
<p class="label">Format 2</p>
3587
<p class="format">calendarComponent::getProperty( &quot;Action&quot;, FALSE , TRUE )</p>
3588
<p class="comment">output = array( &quot;value&quot;  =&gt; actionValue<sup>1</sup>
3589
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
3590
<p class="label">Example</p>
3591
<p class="example">&lt;?php
3592
.. .
3593
$action = $valarm-&gt;getProperty( &quot;action&quot; );
3594
.. .
3595
</p>
3596
<h5>Set ACTION</h5>
3597
<p>Insert property value.</p>
3598
<p class="label">Format</p>
3599
<p class="format">calendarComponent::setProperty( &quot;Action&quot;, actionValue [, xparams ] )</p>
3600
<p class="comment">actionValue<sup>1</sup> = (string) one of &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;
3601
xparams<sup>2</sup>     = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
3602
</p>
3603
<p class="label">Example</p>
3604
<p class="example">&lt;?php
3605
.. .
3606
$valarm-&gt;setProperty( &quot;action&quot;, &quot;DISPLAY&quot; );
3607
.. .
3608
</p>
3609
<br>
3610
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3611

    
3612

    
3613
<a name="ATTACH"></a><h3>3.2.6 ATTACH</h3>
3614
<p>
3615
The property provides the capability to associate a document object with a <strong>calendar</strong> component. The property is
3616
is REQUIRED and MUST NOT occur more than once in an &quot;ALARM&quot; (&quot;ACTION&quot; &quot;procedure&quot;),
3617
OPTIONAL and MUST NOT occur more than once in an &quot;ALARM&quot; (&quot;ACTION&quot; &quot;audio&quot;) and
3618
OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VALARM">VALARM</a> (&quot;ACTION&quot; &quot;email&quot;) components.
3619
</p>
3620
<p>
3621
The default value type for ATTACH is URI. The value type can also be set to BINARY to indicate inline binary encoded content (params<sup>2</sup>).
3622
</p>
3623
<p>
3624
If using other parameters than the recommended &quot;FMTTYPE&quot; and the mandatory &quot;ENCODING&quot; (=&quot;BASE64&quot;)and &quot;VALUE&quot; (=&quot;BINARY&quot;)
3625
for an inline binary encoded attachment,
3626
please use only characters within the ASCII character set in parameter name and content,
3627
to ensure proper line folding when using <a href="#createCalendar">createCalendar</a> and/or <a href="#returnCalendar">returnCalendar</a>.
3628
</p>
3629
<h5>Create ATTACH</h5>
3630
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3631
<p class="label">Format</p>
3632
<p class="format">calendarComponent::createAttach()</p>
3633
<p class="label">Example</p>
3634
<p class="example">&lt;?php
3635
.. .
3636
$str = $component-&gt;createAttach();
3637
.. .
3638
</p>
3639
<h5>Delete ATTACH</h5>
3640
<p>Remove ATTACH from component.</p>
3641
<p class="label">Format</p>
3642
<p class="format">calendarComponent::deleteProperty( &quot;ATTACH&quot; )</p>
3643
<p class="label">Example 1</p>
3644
<p class="example">&lt;?php
3645
.. .
3646
$valarm-&gt;deleteProperty( &quot;ATTACH&quot; );
3647
.. .
3648
</p>
3649
<p class="label">Example 2</p>
3650
Delete ATTACH property no 2.
3651
<p class="example">&lt;?php
3652
.. .
3653
$valarm-&gt;deleteProperty( &quot;ATTACH&quot;, 2 );
3654
.. .
3655
</p>
3656
<p class="label">Example 3</p>
3657
Deleting all ATTACH properties.
3658
<p class="example">&lt;?php
3659
.. .
3660
while( $valarm-&gt;deleteProperty( &quot;ATTACH&quot; ))
3661
  continue;
3662
.. .
3663
</p>
3664
<h5>Get ATTACH</h5>
3665
<p>If set, returns property value(-s), otherwise FALSE.</p>
3666
<p class="label">Format 1</p>
3667
<p class="format">calendarComponent::getProperty( &quot;Attach&quot; )</p>
3668
<p class="comment">output = attachValue<sup>1</sup></p>
3669
<p class="label">Format 2</p>
3670
<p class="format">calendarComponent::getProperty( &quot;ATTACH&quot;, propOrderNo/FALSE , TRUE )</p>
3671
<p class="comment">propOrderNo = (int) specific property value,
3672
<p class="comment">output = array( &quot;value&quot;  =&gt; attachValue<sup>1</sup>
3673
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
3674
<p class="label">Format 3</p>
3675
<p class="format">calendarComponent::getProperty( &quot;Attach&quot;, propOrderNo )</p>
3676
<p class="comment">propOrderNo = (int) specific property value</p>
3677
<p class="comment">Get propOrderNo ATTACH</p>
3678
<p class="label">Example</p>
3679
<p class="example">&lt;?php
3680
.. .
3681
$attach = $valarm-&gt;getProperty( &quot;attach&quot; );
3682
.. .
3683
</p>
3684
<h5>Set ATTACH</h5>
3685
<p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
3686
<p class="label">Format</p>
3687
<p class="format">calendarComponent::setProperty( &quot;attach&quot;, attachValue<sup>1</sup> [, params [, propOrderNo ]] )</p>
3688
<p class="comment">attachValue<sup>1</sup> = (string) URI / inline binary encoded content
3689
params<sup>2</sup>      = (array ) ( [ &quot;ENCODING&quot; =&gt; &quot;BASE64&quot;, &quot;VALUE&quot; =&gt; &quot;BINARY&quot; ]
3690
                          [, &quot;FMTTYPE&quot;  =&gt; contentType ]
3691
                         *[,&nbsp;xparams ] )
3692
contentType  = (string) The parameter value MUST be the TEXT for either an IANA
3693
                        registered content type or a non-standard content type.
3694
xparams      = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
3695
propOrderNo  = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
3696
</p>
3697
<p class="label">Example</p>
3698
<p class="example">&lt;?php
3699
.. .
3700
$vevent-&gt;setProperty( &quot;attach&quot;
3701
                    , &quot;ftp://domain.com/pub/docs/agenda.doc&quot;
3702
                    , array( &quot;FMTTYPE&quot; =&gt; &quot;application/binary&quot; ));
3703
.. .
3704
</p>
3705
<br>
3706
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3707

    
3708

    
3709
<a name="ATTENDEE"></a><h3>3.2.7 ATTENDEE</h3>
3710
<p>
3711
The property defines an "Attendee" within a <strong>calendar</strong> component and is OPTIONAL and MUST NOT occur more than once
3712
in a VALARM (&quot;ACTION&quot; &quot;email&quot;), OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
3713
</p>
3714
<p>This value type for ATTENDEE is URI, a <strong>calendar</strong> user address.</p>
3715
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) ATTENDEE values.</p>
3716
<p>You can export <strong>calendar</strong> ATTENDEE values as <a href="#iCal2vCards">vCards</a>.
3717
<h5>Create ATTENDEE</h5>
3718
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3719
<p class="label">Format</p>
3720
<p class="format">calendarComponent::createAttendee()</p>
3721
<p class="label">Example</p>
3722
<p class="example">&lt;?php
3723
.. .
3724
$str = $component-&gt;createAttendee();
3725
.. .
3726
</p>
3727
<h5>Delete ATTENDEE</h5>
3728
<p>Remove ATTENDEE from component.</p>
3729
<p class="label">Format</p>
3730
<p class="format">calendarComponent::deleteProperty( &quot;ATTENDEE&quot; )</p>
3731
<p class="label">Example 1</p>
3732
<p>Delete (single/first) ATTENDEE property</p>
3733
<p class="example">&lt;?php
3734
.. .
3735
$valarm-&gt;deleteProperty( &quot;ATTENDEE&quot; );
3736
.. .
3737
</p>
3738
<p class="label">Example 2</p>
3739
<p>Delete ATTENDEE property no 2.</p>
3740
<p class="example">&lt;?php
3741
.. .
3742
$valarm-&gt;deleteProperty( &quot;ATTENDEE&quot;, 2 );
3743
.. .
3744
</p>
3745
<p class="label">Example 3</p>
3746
Deleting all ATTENDEE properties.
3747
<p class="example">&lt;?php
3748
.. .
3749
while( $valarm-&gt;deleteProperty( &quot;ATTENDEE&quot; ))
3750
  continue;
3751
.. .
3752
</p>
3753
<h5>Get ATTENDEE</h5>
3754
<p>If set, returns property value(-s), otherwise FALSE.</p>
3755
<p class="label">Format 1</p>
3756
<p class="format">calendarComponent::getProperty( &quot;Attendee&quot; )</p>
3757
<p class="comment">output = attendeeValue<sup>1</sup></p>
3758
<p class="label">Format 2</p>
3759
<p class="format">calendarComponent::getProperty( &quot;ATTENDEE&quot;, propOrderNo/FALSE , TRUE )</p>
3760
<p class="comment">propOrderNo = (int) specific property value</p>
3761
<p class="comment">output = array( &quot;value&quot;  =&gt; attendeeValue<sup>1</sup>
3762
              , &quot;params&quot; =&gt; array( params<sup>2</sup> ))</p>
3763
<p class="label">Format 3</p>
3764
<p class="format">calendarComponent::getProperty( &quot;ATTENDEE&quot;, propOrderNo )</p>
3765
<p class="comment">propOrderNo = (int) specific property value</p>
3766
<p class="comment">output = attendeeValue<sup>1</sup></p>
3767
<p class="label">Example</p>
3768
<p class="example">&lt;?php
3769
.. .
3770
$attendee = $valarm-&gt;getProperty( &quot;attendee&quot; );
3771
.. .
3772
</p>
3773
<h5>Set ATTENDEE</h5>
3774
<p>
3775
Insert property value. If exist, default parameter values are removed after input (params<sup>2</sup>).
3776
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738 ),
3777
if missing, &quot;mailto:&quot; is set (indicating an internet mail address).
3778
Also MEMBER and DIR parameters must be prefixed by protocol. DELEGATED-TO, DELEGATED-FROM, SENT-BY parameters
3779
must use protocol &quot;mailto:&quot;, prefixed if missing (indicating an internet mail address).
3780
</p>
3781
<p>
3782
The CN, ROLE, PARTSTAT, RSVP, CUTYPE, MEMBER, DELEGATED-TO,DELEGATED-FROM, SENT-BY and DIR
3783
properties are not accepted (i.e. removed) in a "VFREEBUSY" or "VALARM" "ATTENDEE" property content.
3784
</p>
3785
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
3786
<p class="label">Format</p>
3787
<p class="format">calendarComponent::setProperty( &quot;attendee&quot;, attendeeValue [, params [, propOrderNo ]] )</p>
3788
<p class="comment">attendeeValue<sup>1</sup> = (string) a <strong>calendar</strong> user address, a URI as defined by
3789
                         [RFC 1738] or any other IANA registered form
3790
                         for a URI.
3791
params<sup>2</sup>        = (array) ( [CUTYPE] [,MEMBER] [,ROLE] [,PARTSTAT]
3792
                           [,RVSP] [,DELEGATED-TO] [,DELEGATED-FROM]
3793
                           [,SENT-BY] [,CN] [,DIR] [,LANGUAGE]
3794
                          *[,xparams] )
3795
CUTYPE        = "CUTYPE" =&gt; &quot;INDIVIDUAL&quot;
3796
                            (An individual, <b>Default</b>)
3797
                          / &quot;GROUP&quot;
3798
                            (A group of individuals)
3799
                          / &quot;RESOURCE&quot;
3800
                            (A physical resource)
3801
                          / &quot;ROOM&quot;
3802
                            (A room resource)
3803
                          / &quot;UNKNOWN&quot;
3804
                            (Otherwise not known)
3805
                          / (string) x-name
3806
                            (Experimental type)
3807
                          / iana-token
3808
                            (string) (Other IANA registered type)
3809
MEMBER        = "MEMBER" =&gt; array( *[ (string) &quot;single member
3810
                            of the group or list membership&quot;])
3811
ROLE          = "ROLE"   =&gt; &quot;CHAIR&quot;
3812
                            (Indicates chair of the <strong>calendar</strong>
3813
                             entity)
3814
                          / &quot;REQ-PARTICIPANT&quot;
3815
                            (required participation, <b>Default</b>)
3816
                          / &quot;OPT-PARTICIPANT&quot;
3817
                            (optional participation)
3818
                          / &quot;NON-PARTICIPANT&quot;
3819
                            (information purposes only)
3820
                          / (string) x-name
3821
                            (Experimental role)
3822
                          / (string) iana-token
3823
                            (Other IANA role)
3824
PARTSTAT       = &quot;PARTSTAT&quot; =&gt; &quot;NEEDS-ACTION&quot;
3825
                            (Event needs action, <b>Default</b>)
3826
                          / &quot;ACCEPTED&quot;
3827
                            (Event accepted)
3828
                          / &quot;DECLINED&quot;
3829
                            (Event declined)
3830
                          / &quot;TENTATIVE&quot;
3831
                            (Event tentatively accepted)
3832
                          / &quot;DELEGATED&quot;
3833
                            (Event delegated)
3834
                          / &quot;NEEDS-ACTION&quot;
3835
                            (To-do needs action, <b>Default</b>)
3836
                          / &quot;ACCEPTED&quot;
3837
                            (To-do accepted)
3838
                          / &quot;DECLINED&quot;
3839
                            (To-do declined)
3840
                          / &quot;TENTATIVE&quot;
3841
                            (To-do tentatively accepted)
3842
                          / &quot;DELEGATED&quot;
3843
                            (To-do delegated)
3844
                          / &quot;COMPLETED&quot;
3845
                            (To-do completed.
3846
                              <a href="#COMPLETED">COMPLETED</a> property
3847
                                 has date/time completed)
3848
                          / &quot;IN-PROCESS&quot;
3849
                            (To-do in process of being completed)
3850
                          / &quot;NEEDS-ACTION&quot;
3851
                            (Journal needs action, <b>Default</b>)
3852
                          / &quot;ACCEPTED&quot;
3853
                            (Journal accepted)
3854
                          / &quot;DECLINED&quot;
3855
                            (Journal declined)
3856
                          / (string) x-name
3857
                            (Experimental status)
3858
                          / (string) iana-token
3859
                            (Other IANA registered status)
3860
RSVP           = &quot;RSVP&quot; =&gt; (string) &quot;TRUE&quot;
3861
                                  / &quot;FALSE&quot;, <b>Default</b> (reply expectation)
3862
DELEGATED-TO   = &quot;DELEGATED-TO&quot; =&gt; array(*[(string) &quot;single <strong>calendar</strong> user
3863
                                            to specified by the property
3864
                                            has delegated participation&quot;])
3865
DELEGATED-FROM = &quot;DELEGATED-FROM&quot; =&gt; array( *[ (string) &quot;single <strong>calendar</strong> user that
3866
                                                have delegated their
3867
                                                participation to the
3868
                                                <strong>calendar</strong> user specified
3869
                                                by the property&quot; ] )
3870
SENT-BY        = &quot;SENT-BY&quot; =&gt; (string) single <strong>calendar</strong> user that is
3871
                              acting on behalf
3872
                              of the <strong>calendar</strong> user
3873
                              specified by the property&quot;
3874
LANGUAGE       = &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; (applies to the CN parameter value)
3875
CN             = &quot;CN&quot; =&gt; (string) &quot;common name to be associated with the <strong>calendar</strong>
3876
                          user specified by the property&quot;
3877
DIR            = &quot;DIR&quot; =&gt; (string) &quot;reference to a directory entry associated with
3878
                           the <strong>calendar</strong> user specified by the property&quot;
3879
xparams        = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
3880
propOrderNo    = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
3881
lang<sup>*</sup>          = as defined in [RFC5646]</p>
3882
<p>
3883
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
3884
</p>
3885
<p class="label">Example</p>
3886
<p class="example">&lt;?php
3887
.. .
3888
$vevent-&gt;setProperty( &quot;attendee&quot;
3889
                    , &quot;attendee1@ical.net&quot;
3890
$vevent-&gt;setProperty( &quot;attendee&quot;
3891
                    , &quot;attendee2@ical.net&quot;
3892
                    , array( &quot;cutype&quot;   =&gt; &quot;INDIVIDUAL&quot;
3893
                           , &quot;member&quot;   =&gt; array( &quot;member1@ical.net&quot;
3894
                                                , &quot;member2@ical.net&quot;
3895
                                                , &quot;member3@ical.net&quot; )
3896
                           , &quot;role&quot;     =&gt; &quot;CHAIR&quot;
3897
                           , &quot;PARTSTAT&quot; =&gt; &quot;ACCEPTED&quot;
3898
                           , &quot;RSVP&quot;     =&gt; &quot;TRUE&quot;
3899
                           , &quot;DELEgated-to&quot; =&gt; array( &quot;part1@ical.net&quot;
3900
                                                    , &quot;part2@ical.net&quot;
3901
                                                    , &quot;part3@ical.net&quot; )
3902
                           , &quot;delegateD-FROM&quot; =&gt;array( &quot;cio@ical.net&quot;
3903
                                                     , &quot;vice.cio@ical.net&quot;)
3904
                           , &quot;SENT-BY&quot;  =&gt; &quot;secretary@ical.net&quot;
3905
                           , &quot;LANGUAGE&quot; =&gt; &quot;us-EN&quot;
3906
                           , &quot;CN&quot;       =&gt; &quot;John Doe&quot;
3907
                           , &quot;DIR&quot;      =&gt; &quot;http://www.ical.net/info.doc&quot;
3908
                           , &quot;x-agenda&quot; =&gt; &quot;status reports&quot; <span class="comment">// xparam</span>
3909
                           , &quot;x-length&quot; =&gt; &quot;15 min&quot;  ));    <span class="comment">// xparam</span>
3910
.. .
3911
</p>
3912
<br>
3913
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3914

    
3915
<a name="CATEGORIES"></a><h3>3.2.8 CATEGORIES</h3>
3916
<p>
3917
This property defines the categories for a <strong>calendar</strong> component and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
3918
</p>
3919
<p>
3920
The value type for CATEGORIES is TEXT.
3921
</p>
3922
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) CATEGORIES values.</p>
3923

    
3924
<h5>Create CATEGORIES</h5>
3925
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3926
<p class="label">Format</p>
3927
<p class="format">calendarComponent::createCategories()</p>
3928
<p class="label">Example</p>
3929
<p class="example">&lt;?php
3930
.. .
3931
$str = $component-&gt;createCategories();
3932
.. .
3933
</p>
3934
<h5>Delete CATEGORIES</h5>
3935
<p>Remove CATEGORIES from component.</p>
3936
<p class="label">Format</p>
3937
<p class="format">calendarComponent::deleteProperty( &quot;CATEGORIES&quot; )</p>
3938
<p class="label">Example 1</p>
3939
<p>Delete (single/first) CATEGORIES property</p>
3940
<p class="example">&lt;?php
3941
.. .
3942
$vevent-&gt;deleteProperty( &quot;CATEGORIES&quot; );
3943
.. .
3944
</p>
3945
<p class="label">Example 2</p>
3946
<p>Delete CATEGORIES property no 2.</p>
3947
<p class="example">&lt;?php
3948
.. .
3949
$vevent-&gt;deleteProperty( &quot;CATEGORIES&quot;, 2 );
3950
.. .
3951
</p>
3952
<p class="label">Example 3</p>
3953
<p>Deleting all CATEGORIES properties.</p>
3954
<p class="example">&lt;?php
3955
.. .
3956
while( $vevent-&gt;deleteProperty( &quot;CATEGORIES&quot; ))
3957
  continue;
3958
.. .
3959
</p>
3960
<h5>Get CATEGORIES</h5>
3961
<p>If set, returns property value(-s), otherwise FALSE.</p>
3962
<p class="label">Format 1</p>
3963
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot; )</p>
3964
<p class="comment">output = categoryValue<sup>1</sup></p>
3965
<p class="label">Format 2</p>
3966
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot;, propOrderNo/FALSE , TRUE )</p>
3967
<p class="comment">propOrderNo = (int) specific property value</p>
3968
<p class="comment">output = array( &quot;value&quot;  =&gt; categories<sup>1</sup>
3969
              , &quot;params&quot; =&gt; params<sup>3</sup> )</p>
3970
<p class="label">Format 3</p>
3971
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot;, propOrderNo )</p>
3972
<p class="comment">propOrderNo = (int) specific property value</p>
3973
<p class="comment">Get propOrderNo CATEGORIES</p>
3974
<p class="label">Example</p>
3975
<p class="example">&lt;?php
3976
.. .
3977
$categories = $valarm-&gt;getProperty( &quot;categories&quot; );
3978
.. .
3979
</p>
3980
<h5>Set CATEGORIES</h5>
3981
<p>Insert property value.</p>
3982
<p>
3983
In spite of the fact that CATEGORIES may contain a (comma separated) list of values,
3984
a strong recommendation is to split a CATEGORIES &quot;list&quot; into multiple single CATEGORIES entries.
3985
</p>
3986
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
3987
<p class="label">Format</p>
3988
<p class="format">calendarComponent::setProperty( &quot;categories&quot;, categories [, params [, propOrderNo ]] )</p>
3989
<p class="comment">categories<sup>1</sup>    = (string) categoryValue / (array) ( *categoryValue )
3990
categoryValue<sup>2</sup> = (string) textual categories or subtypes of the <strong>calendar</strong> component,
3991
                can be specified as a list of categories
3992
                separated by the COMMA character
3993
params<sup>3</sup>        = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;&lt;lang<sup>*</sup>&gt;&quot;] *[, xparams] )
3994
xparams        = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
3995
propOrderNo    = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
3996
lang<sup>*</sup>         = as defined in [RFC5646]</p>
3997
<p class="label">Example</p>
3998
<p class="example">&lt;?php
3999
.. .
4000
$vevent-&gt;setProperty( &quot;categories&quot;, &quot;project_x&quot; );
4001
.. .
4002
</p>
4003
<br>
4004
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4005

    
4006

    
4007
<a name="CLASS"></a><h3>3.2.9 CLASS</h3>
4008
<p>
4009
This property defines the access classification for a <strong>calendar</strong> component and is OPTIONAL
4010
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
4011
</p>
4012
<h5>Create CLASS</h5>
4013
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4014
<p class="label">Format</p>
4015
<p class="format">calendarComponent::createClass()</p>
4016
<p class="label">Example</p>
4017
<p class="example">&lt;?php
4018
.. .
4019
$str = $component-&gt;createClass();
4020
.. .
4021
</p>
4022
<h5>Delete CLASS</h5>
4023
<p>Remove CLASS from component.</p>
4024
<p class="label">Format</p>
4025
<p class="format">calendarComponent::deleteProperty( &quot;CLASS&quot; )</p>
4026
<p class="label">Example</p>
4027
<p class="example">&lt;?php
4028
.. .
4029
$vjournal-&gt;deleteProperty( &quot;CLASS&quot; );
4030
.. .
4031
</p>
4032
<h5>Get CLASS</h5>
4033
<p>If set, returns property value, otherwise FALSE.</p>
4034
<p class="label">Format 1</p>
4035
<p class="format">calendarComponent::getProperty( &quot;CLASS&quot; )</p>
4036
<p class="comment">output = classValue<sup>1</sup></p>
4037
<p class="label">Format 2</p>
4038
<p class="format">calendarComponent::getProperty( &quot;CLASS&quot;, FALSE , TRUE )</p>
4039
<p class="comment">output = array &quot;value&quot;   =&gt; classValue<sup>1</sup>
4040
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4041
<p class="label">Example</p>
4042
<p class="example">&lt;?php
4043
.. .
4044
$class = $valarm-&gt;getProperty( &quot;class&quot; );
4045
.. .
4046
</p>
4047
<h5>Set CLASS</h5>
4048
<p>Insert property value.</p>
4049
<p class="label">Format</p>
4050
<p class="format">calendarComponent::setProperty( &quot;class&quot;, classvalue [, xparams ] )</p>
4051
<p class="comment">classvalue<sup>1</sup> = &quot;PUBLIC&quot;
4052
            / &quot;PRIVATE&quot;
4053
            / &quot;CONFIDENTIAL&quot;
4054
            / (string) iana-token
4055
            / (string) x-name
4056
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
4057
</p>
4058
<p class="label">Example</p>
4059
<p class="example">&lt;?php
4060
.. .
4061
$vevent-&gt;setProperty( &quot;class&quot;, &quot;CONFIDENTIAL&quot; );
4062
.. .
4063
</p>
4064
<br>
4065
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4066

    
4067
<a name="COMMENT"></a><h3>3.2.10 COMMENT</h3>
4068
<p>
4069
This property specifies non-processing information intended to provide a comment to the <strong>calendar</strong> user
4070
and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>, <a href="#VFREEBUSY">VFREEBUSY</a>, <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
4071
</p>
4072
<p>The value type for COMMENT is TEXT.</p>
4073
<h5>Create COMMENT</h5>
4074
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4075
<p class="label">Format</p>
4076
<p class="format">calendarComponent::createComment()</p>
4077
<p class="label">Example</p>
4078
<p class="example">&lt;?php
4079
.. .
4080
$str = $component-&gt;createComment();
4081
.. .
4082
</p>
4083
<h5>Delete COMMENT</h5>
4084
<p>Remove COMMENT from component.</p>
4085
<p class="label">Format</p>
4086
<p class="format">calendarComponent::deleteProperty( &quot;COMMENT&quot; )</p>
4087
<p class="label">Example 1</p>
4088
<p>Delete (single/first) COMMENT property</p>
4089
<p class="example">&lt;?php
4090
.. .
4091
$vevent-&gt;deleteProperty( &quot;COMMENT&quot; );
4092
.. .
4093
</p>
4094
<p class="label">Example 2</p>
4095
<p>Delete COMMENT property no 2.</p>
4096
<p class="example">&lt;?php
4097
.. .
4098
$vevent-&gt;deleteProperty( &quot;COMMENT&quot;, 2 );
4099
.. .
4100
</p>
4101
<p class="label">Example 3</p>
4102
<p>Deleting all COMMENT properties.</p>
4103
<p class="example">&lt;?php
4104
.. .
4105
while( $vevent-&gt;deleteProperty( &quot;COMMENT&quot; ))
4106
  continue;
4107
.. .
4108
</p>
4109
<h5>Get COMMENT</h5>
4110
<p>If set, returns property value, otherwise FALSE.</p>
4111
<p class="label">Format 1</p>
4112
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot; )</p>
4113
<p class="comment">output = commentValue<sup>1</sup></p>
4114
<p class="label">Format 2</p>
4115
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot;, propOrderNo/FALSE , TRUE )</p>
4116
<p class="comment">propOrderNo = (int) specific property value</p>
4117
<p class="comment">output = array( &quot;value&quot;  =&gt; commentValue<sup>1</sup>
4118
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4119
<p class="label">Format 3</p>
4120
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot;, propOrderNo )</p>
4121
<p class="comment">propOrderNo = (int) specific property value</p>
4122
<p class="comment">Get propOrderNo COMMENT</p>
4123
<p class="label">Example</p>
4124
<p class="example">&lt;?php
4125
.. .
4126
$comment = $vevent-&gt;getProperty( &quot;comment&quot; );
4127
.. .
4128
</p>
4129
<h5>Set COMMENT</h5>
4130
<p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
4131
<p class="label">Format</p>
4132
<p class="format">calendarComponent::setProperty( &quot;comment&quot;, commentValue [, params [, propOrderNo ]] )</p>
4133
<p class="comment">commentValue<sup>1</sup> = (string) Value type Text
4134
params<sup>2</sup>       = (array) (
4135
                   [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
4136
                   [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
4137
                  *[, xparams ] )
4138
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4139
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4140
lang<sup>*</sup>         = as defined in [RFC5646]</p>
4141
<p class="label">Example</p>
4142
<p class="example">&lt;?php
4143
.. .
4144
$vevent-&gt;setProperty( &quot;comment&quot;, &quot;this is a comment&quot; );
4145
.. .
4146
</p>
4147
<br>
4148
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4149

    
4150

    
4151
<a name="COMPLETED"></a><h3>3.2.11 COMPLETED</h3>
4152
<p>
4153
This property defines the date and time that a <a href="#VTODO">VTODO</a> was actually completed and is OPTIONAL and MUST NOT occur more than once.
4154
</p>
4155
<p>The value type for COMPLETED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
4156
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
4157
<br>
4158
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4159

    
4160

    
4161
<a name="CONTACT"></a><h3>3.2.12 CONTACT</h3>
4162
<p>
4163
The property is used to represent textual contact information or alternately a reference to textual contact information
4164
 associated with the <strong>calendar</strong> component. The property is OPTIONAL and MUST NOT occur more than once in
4165
 a VFREEBUSY or MAY occur more than once  in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and
4166
 <a href="#VJOURNAL">VJOURNAL</a> components.
4167
</p>
4168
<p>The value type for CONTACT is TEXT.</p>
4169
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) CONTACT values.</p>
4170
<p>You can export <strong>calendar</strong> CONTACT values as <a href="#iCal2vCards">vCards</a>.
4171
<h5>Create CONTACT</h5>
4172
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4173
<p class="label">Format</p>
4174
<p class="format">calendarComponent::createContact()</p>
4175
<p class="label">Example</p>
4176
<p class="example">&lt;?php
4177
.. .
4178
$str = $component-&gt;createContact();
4179
.. .
4180
</p>
4181
<h5>Delete CONTACT</h5>
4182
<p>Remove CONTACT from component.</p>
4183
<p class="label">Format</p>
4184
<p class="format">calendarComponent::deleteProperty( &quot;CONTACT&quot; )</p>
4185
<p class="label">Example 1</p>
4186
<p>Delete (single/first) CONTACT property<p>
4187
<p class="example">&lt;?php
4188
.. .
4189
$vevent-&gt;deleteProperty( &quot;CONTACT&quot; );
4190
.. .
4191
</p>
4192
<p class="label">Example 2</p>
4193
<p>Delete CONTACT property no 2.</p>
4194
<p class="example">&lt;?php
4195
.. .
4196
$vevent-&gt;deleteProperty( &quot;CONTACT&quot;, 2 );
4197
.. .
4198
</p>
4199
<p class="label">Example 3</p>
4200
<p>Deleting all CONTACT properties.</p>
4201
<p class="example">&lt;?php
4202
.. .
4203
while( $vevent-&gt;deleteProperty( &quot;CONTACT&quot; ))
4204
  continue;
4205
.. .
4206
</p>
4207
<h5>Get CONTACT</h5>
4208
<p>If set, returns property value, otherwise FALSE.</p>
4209
<p class="label">Format 1</p>
4210
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot; )</p>
4211
<p class="comment">output = contactValue<sup>1</sup></p>
4212
<p class="label">Format 2</p>
4213
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot;, propOrderNo/FALSE , TRUE )</p>
4214
<p class="comment">propOrderNo = (int) specific property value</p>
4215
<p class="comment">output = array( &quot;value&quot;  =&gt; contactValue<sup>1</sup>
4216
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4217
<p class="label">Format 3</p>
4218
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot;, propOrderNo )</p>
4219
<p class="comment">propOrderNo = (int) specific property value</p>
4220
<p class="comment">Get propOrderNo CONTACT</p>
4221
<p class="label">Example</p>
4222
<p class="example">&lt;?php
4223
.. .
4224
$contact = $vevent-&gt;getProperty( &quot;contact&quot; );
4225
.. .
4226
</p>
4227
<h5>Set CONTACT</h5>
4228
<p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
4229
<p class="label">Format</p>
4230
<p class="format">calendarComponent::setProperty( &quot;contact&quot;, contactValue [, params [, propOrderNo ]] )</p>
4231
<p class="comment">contactValue<sup>1</sup> = (string) Value type TEXT
4232
params<sup>2</sup>       = (array) (
4233
                   [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
4234
                   [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
4235
                  *[, xparams] )
4236
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4237
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4238
lang<sup>*</sup>         = as defined in [RFC5646]</p>
4239
<p class="label">Example</p>
4240
<p class="example">&lt;?php
4241
.. .
4242
$c-&gt;setProperty( &quot;contact&quot;, &quot;tel 012-34 56 789&quot; )
4243
.. .
4244
</p>
4245
<br>
4246
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4247

    
4248

    
4249
<a name="CREATED"></a><h3>3.2.13 CREATED</h3>
4250
<p>
4251
This property specifies the date and time that the <strong>calendar</strong> information was created by
4252
the <strong>calendar</strong> user agent in the <strong>calendar</strong> store.
4253
Note: This is analogous to the creation date and time for a file in the file system.
4254
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
4255
<a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
4256
</p>
4257
<p>The value type for CREATED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
4258
<h5>Create CREATED</h5>
4259
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4260
<p class="label">Format</p>
4261
<p class="format">calendarComponent::createCreated()</p>
4262
<p class="label">Example</p>
4263
<p class="example">&lt;?php
4264
.. .
4265
$str = $component-&gt;createCreated();
4266
.. .
4267
</p>
4268
<h5>Delete CREATED</h5>
4269
<p>Remove CREATED from component.</p>
4270
<p class="label">Format</p>
4271
<p class="format">calendarComponent::deleteProperty( &quot;CREATED&quot; )</p>
4272
<p class="label">Example</p>
4273
<p class="example">&lt;?php
4274
.. .
4275
$vevent-&gt;deleteProperty( &quot;CREATED&quot; );
4276
.. .
4277
</p>
4278
<h5>Get CREATED</h5>
4279
<p>If set, returns property value, otherwise FALSE.</p>
4280
<p class="label">Format 1</p>
4281
<p class="format">calendarComponent::getProperty( &quot;CREATED&quot; )</p>
4282
<p class="comment">output = createdDate<sup>1</sup></p>
4283
<p class="label">Format 2</p>
4284
<p class="format">calendarComponent::getProperty( &quot;CREATED&quot;, FALSE , TRUE )</p>
4285
<p class="comment">output = array( &quot;value&quot;  =&gt; createdDate<sup>1</sup>
4286
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4287
<p class="label">Example</p>
4288
<p class="example">&lt;?php
4289
.. .
4290
$created = $vevent-&gt;getProperty( &quot;CREATED&quot; );
4291
.. .
4292
</p>
4293
<h5>Set CREATED</h5>
4294
<p>
4295
Insert property value. Input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or,
4296
if &quot;offset&quot; parameter is used, converted to a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
4297
Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a local datetime to UTC datetime.
4298
</p>
4299
<p>The current UTC date-time is set if invoked without parameters.</p>
4300
<p class="label">Format</p>
4301
<p class="format">calendarComponent::setProperty( &quot;created&quot;, [ createdDate [, xparams ]] )</p>
4302
<p class="comment">createdDate<sup>1</sup> = (array) ( &quot;year&quot;  =&gt; (int) year
4303
                       , &quot;month&quot; =&gt; (int) month
4304
                       , &quot;day&quot;   =&gt; (int) day
4305
                      [, &quot;hour&quot;  =&gt; (int) hour
4306
                       , &quot;min&quot;   =&gt; (int) min
4307
                       , &quot;sec&quot;   =&gt; (int) sec
4308
                       , &quot;tz&quot;    =&gt; offset ]] )
4309
createdDate  = (int) year
4310
             , (int) month
4311
             , (int) day
4312
            [, (int) hour
4313
             , (int) min
4314
             , (int) sec ]
4315
createdDate  = (array) ( (int) year
4316
                       , (int) month
4317
                       , (int) day
4318
                      [, (int) hour
4319
                       , (int) min
4320
                       , (int) sec
4321
                      [, offset ]] )
4322
createdDate  = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4323
createdDate  = (string) date/datetime string<sup>*</sup>
4324
offset       = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4325
xparams<sup>2</sup>     = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
4326
<br>date/datetime string<sup>*</sup> recommended formats
4327
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
4328
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
4329
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
4330
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
4331
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
4332
    trailing characters (digits), if exists, will be interpreted as offset
4333
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
4334
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
4335
<p class="label">Example 1</p>
4336
<p class="example">&lt;?php
4337
.. .
4338
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
4339
$vcalendar = new vcalendar( $config );
4340
$vtodo     = &amp; $vcalendar-&gt;newComponent( &quot;vtodo&quot; );
4341
.. .
4342
$vtodo-&gt;setProperty( &quot;created&quot;, 2006, 8, 11, 14, 30, 35 ); // <span class="comment">11 august 2006 14.30.35 UTC</span>
4343
.. .
4344
</p>
4345
<p class="label">Example 2</p>
4346
<p class="example">&lt;?php
4347
.. .
4348
$date = array(&quot;year&quot; =&gt; 2006, &quot;month&quot; =&gt; 10, &quot;day&quot; =&gt; 10,
4349
              &quot;hour&quot; =&gt; 10, &quot;min&quot; =&gt; 0, &quot;sec&quot; =&gt; 0, &quot;tz&quot; =&gt; &quot;+0200&quot;);
4350
              // <span class="comment">local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4351
$vtodo-&gt;setProperty( &quot;created&quot;, $date );
4352
.. .
4353
</p>
4354
<p class="label">Example 3</p>
4355
<p class="example">&lt;?php
4356
.. .
4357
$vevent-&gt;setProperty( &quot;created&quot; ); // <span class="comment">current UTC date-time is set if invoked without parameters</span>
4358
.. .
4359
</p>
4360
<br>
4361
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4362

    
4363

    
4364
<a name="DESCRIPTION"></a><h3>3.2.14 DESCRIPTION</h3>
4365
<p>
4366
This property provides a more complete textual description of the <strong>calendar</strong> component,
4367
than that provided by the <a href="#SUMMARY">SUMMARY</a> property (, analogous to a mail BODY).
4368
The property is OPTIONAL, MUST NOT occur more than once within <a href="#VEVENT">VEVENT</a>,
4369
<a href="#VTODO">VTODO</a> or <a href="#VALARM">VALARM</a> (PROCEDURE) but can be specified multiple
4370
times within a <a href="#VJOURNAL">VJOURNAL</a> <strong>calendar</strong> component. The property is REQUIRED in  <a href="#VALARM">VALARM</a> (DISPLAY, EMAIL) component.
4371
</p>
4372
<p>The value type for DESCRIPTION is TEXT.</p>
4373
<h5>Create DESCRIPTION</h5>
4374
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4375
<p class="label">Format</p>
4376
<p class="format">calendarComponent::createDescription()</p>
4377
<p class="label">Example</p>
4378
<p class="example">&lt;?php
4379
.. .
4380
$str = $component-&gt;createDescription();
4381
.. .
4382
</p>
4383
<h5>Delete DESCRIPTION</h5>
4384
<p>Remove DESCRIPTION from component.</p>
4385
<p class="label">Format</p>
4386
<p class="format">calendarComponent::deleteProperty( &quot;DESCRIPTION&quot; )</p>
4387
<p class="label">Example 1</p>
4388
<p>Delete (single/first) DESCRIPTION property.</p>
4389
<p class="example">&lt;?php
4390
.. .
4391
$vevent-&gt;deleteProperty( &quot;DESCRIPTION&quot; );
4392
.. .
4393
</p>
4394
<p class="label">Example 2</p>
4395
<p>Delete DESCRIPTION property no 2.</p>
4396
<p class="example">&lt;?php
4397
.. .
4398
$vjournal-&gt;deleteProperty( &quot;DESCRIPTION&quot;, 2 );
4399
.. .
4400
</p>
4401
<p class="label">Example 3</p>
4402
<p>Deleting all DESCRIPTION properties.</p>
4403
<p class="example">&lt;?php
4404
.. .
4405
while( $vjournal-&gt;deleteProperty( &quot;DESCRIPTION&quot; ))
4406
  continue;
4407
.. .
4408
</p>
4409
<h5>Get DESCRIPTION</h5>
4410
<p>If set, returns property value(-s), otherwise FALSE.</p>
4411
<p class="label">Format 1</p>
4412
<p class="format">calendarComponent::getProperty( &quot;DESCRIPTION&quot; )</p>
4413
<p class="comment">output = descriptionValue<sup>1</sup></p>
4414
<p class="label">Format 2</p>
4415
<p class="format">calendarComponent::getProperty( &quot;DESCRIPTION&quot;, FALSE , TRUE )</p>
4416
<p class="comment">output = array( &quot;value&quot;  =&gt; descriptionValue<sup>1</sup>
4417
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4418
<p class="label">Example</p>
4419
<p class="example">&lt;?php
4420
.. .
4421
$description = $vevent-&gt;getProperty( &quot;description&quot; );
4422
.. .
4423
</p>
4424
<h5>Set DESCRIPTION</h5>
4425
<p>Insert property value.</p>
4426
<br>
4427
Parameters will be ordered as prescribed in [RFC5545].
4428
<p class="label">Format</p>
4429
<p class="format">calendarComponent::setProperty( &quot;description&quot;, descriptionValue [, params [, propOrderNo ]] )</p>
4430
<p class="comment">descriptionValue<sup>1</sup> = (string) Value type TEXT
4431
params<sup>2</sup>         = (array) (
4432
                    [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
4433
                    [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
4434
                   *[, xparams ] )
4435
xparams           = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4436
propOrderNo       = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4437
lang<sup>*</sup>          = as defined in [RFC5646]</p>
4438
<p class="label">Example</p>
4439
<p class="example">&lt;?php
4440
.. .
4441
$vevent-&gt;setProperty( &quot;description&quot;, &quot;This is a description&quot; );
4442
.. .
4443
</p>
4444
<br>
4445
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4446

    
4447

    
4448
<a name="DTEND"></a><h3>3.2.15 DTEND</h3>
4449
<p>
4450
This property specifies the date and time that a <strong>calendar</strong> component ends.
4451
The property is OPTIONAL and MUST NOT occur more than once in VFREEBUSY and VEVENT. In VEVENT, it only occurs
4452
if DURATION NOT occurs.
4453
</p>
4454
<p>
4455
The default value type for DTEND is DATE-TIME, can be set to a DATE value type.
4456
</p>
4457
<p class="quotes">
4458
The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
4459
</p>
4460
<p>
4461
Notice that an end date without a time is in effect midnight of the day before the date,
4462
so for timeless dates, use the date following the event date for it to be correct.
4463
For an &quot;all-day event&quot; and using timeless dates, the DTEND is equal DTSTART plus one day,
4464
example all-day event (2007-12-01)<br>DTSTART;VALUE=DATE:20071201<br> DTEND;VALUE=DATE:20071202.
4465
</p>
4466
<h5>Create DTEND</h5>
4467
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4468
<p class="label">Format</p>
4469
<p class="format">calendarComponent::createDtend()</p>
4470
<p class="label">Example</p>
4471
<p class="example">&lt;?php
4472
.. .
4473
$str = $component-&gt;createDtend();
4474
.. .
4475
</p>
4476
<h5>Delete DTEND</h5>
4477
<p>Remove DTEND from component.</p>
4478
<p class="label">Format</p>
4479
<p class="format">calendarComponent::deleteProperty( &quot;DTEND&quot; )</p>
4480
<p class="label">Example</p>
4481
<p class="example">&lt;?php
4482
.. .
4483
$vevent-&gt;deleteProperty( &quot;DTEND&quot; );
4484
.. .
4485
</p>
4486
<h5>Get DTEND</h5>
4487
<p>If set, returns property value, otherwise FALSE.</p>
4488
<p class="label">Format 1</p>
4489
<p class="format">calendarComponent::getProperty( &quot;DTEND&quot; )</p>
4490
<p class="comment">output = dtendDate<sup>1</sup></p>
4491
<p class="label">Format 2</p>
4492
<p class="format">calendarComponent::getProperty( &quot;DTEND&quot;, FALSE , TRUE )</p>
4493
<p class="comment">output = array( &quot;value&quot;  =&gt; dtendDate<sup>1</sup>
4494
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4495
<p class="label">Example</p>
4496
<p class="example">&lt;?php
4497
.. .
4498
$dtend = $vevent-&gt;getProperty( &quot;dtend&quot; );
4499
.. .
4500
</p>
4501
<h5>Set DTEND</h5>
4502
<p>
4503
Insert property value. If DATE value type is expected, &quot;VALUE&quot; = &quot;DATE&quot; <b>must</b> be set
4504
(in params<sup>2</sup>) otherwise DATE-TIME (default) value type is set.
4505
</p>
4506
<p>
4507
If no timezone parameter (tz or tzidparam below) is set (i.e.local time) and config <a href="#dTZID">TZID</a> is set,
4508
date-time values will be set WITH timezone from config.
4509
Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a datetime from one time zone to another.
4510
</p>
4511
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
4512
<p class="label">Format</p>
4513
<p class="format">calendarComponent::setProperty( &quot;dtend&quot;, dtendDate [, params<sup>2</sup> ] )
4514
<p class="comment">dtendDate<sup>1</sup>    = (array) ( &quot;year&quot;  =&gt; (int) year
4515
                        , &quot;month&quot; =&gt; (int) month
4516
                        , &quot;day&quot;   =&gt; (int) day
4517
                       [, &quot;hour&quot;  =&gt; (int) hour
4518
                        , &quot;min&quot;   =&gt; (int) min
4519
                        , &quot;sec&quot;   =&gt; (int) sec
4520
                       [, &quot;tz&quot;    =&gt; tz ]] )
4521
dtendDate     = (int) year
4522
              , (int) month
4523
              , (int) day
4524
             [, (int) hour
4525
              , (int) min
4526
              , (int) sec
4527
             [, tz ]]
4528
dtendDate     = array( (int) year
4529
                     , (int) month
4530
                     , (int) day
4531
                    [, (int) hour
4532
                     , (int) min
4533
                     , (int) sec
4534
                    [, tz ]] )
4535
dtendDate     = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [,&quot;tz&quot; =&gt; tz])
4536
                // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4537
                // <span class="comment">timestamp with tz=offset will result in a local DATE-TIME</span>
4538
dtendDate     = (string) date/datetime string<sup>*</sup>
4539
                // <span class="comment">Within the "VFREEBUSY" <strong>calendar</strong> component,</span>
4540
                // <span class="comment">the time MUST be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4541
tz            = (string) &lt;timezone  identifier&gt; / offset
4542
                // <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
4543
offset        = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset</span>
4544
                                    // <span class="comment">will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4545
params<sup>2</sup>       = (array) ([ tzidparam/datetimeparam/dateparam ] *[,xparams])
4546
tzidparam     = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
4547
                // <span class="comment">output as local date-time with timezone identifier</span>
4548
                // <span class="comment">if tzidparam=&quot;GMT&quot;/&quot;UTC&quot; then</span>
4549
                // <span class="comment">output date-time is suffixed by 'Z'</span>
4550
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">default, output as date-time</span>
4551
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="comment">output as DATE, ex. all-day event</span>
4552
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4553
<br>date/datetime string<sup>*</sup> recommended formats
4554
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
4555
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
4556
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
4557
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
4558
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
4559
    trailing characters (digits), if exists, will be interpreted as offset/timezone
4560
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
4561
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
4562
<p class="label">Example 1</p>
4563
<p class="example">&lt;?php
4564
.. .
4565
$vevent-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 16, 30, 0 ); <span class="comment">// 11 august 2006 16.30.00 local date</span>
4566
.. .
4567
</p>
4568
<p class="label">Example 2</p>
4569
<p class="example">&lt;?php
4570
.. .
4571
$vfreebusy-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 16, 30, 0, &quot;-040000&quot; );
4572
                         <span class="comment">// 11 august 2006 16.30.00 -040000</span>
4573
                         <span class="comment">// local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4574
.. .
4575
</p>
4576
<p class="label">Example 3</p>
4577
<p class="example">&lt;?php
4578
.. .
4579
$vevent-&gt;setProperty( &quot;dtend&quot;
4580
                    , array( &quot;year&quot; =&gt;, 2006, &quot;month&quot; =&gt; 8, &quot;day&quot;=&gt; 11 )
4581
                    , array( &quot;VALUE&quot; =&gt; &quot;DATE&quot; ));
4582
                    <span class="comment">// end of an all-day event</span>
4583
.. .
4584
</p>
4585
<p class="label">Example 4</p>
4586
<p class="example">&lt;?php
4587
.. .
4588
$calendar->setConfig( 'TZID', 'Europe/Stockholm' );
4589
.. .
4590
$vevent-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 7, 30, 0 );
4591
                   <span class="comment">// output: DTEND;TZID=Europe/Stockholm:20060811T073000</span>
4592
.. .
4593
</p>
4594
<br>
4595
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4596

    
4597

    
4598
<a name="DTSTAMP"></a><h3>3.2.16 DTSTAMP</h3>
4599
<p>
4600
The property indicates the date/time the instance of the <strong>iCalendar</strong> object was created and is OPTIONAL and
4601
MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>
4602
and <a href="#VFREEBUSY">VFREEBUSY</a> components. However, DTSTAMP is <b>AUTOMATICALL§Y GENERATED</b> in iCalcreator when creating a component.
4603
</p>
4604
<p>
4605
DTSTAMP may be required when importing iCal files into some <strong>calendar</strong> software<br>(MS etc.),
4606
as well as (<strong>calendar</strong>) <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and<br>"X-WR-TIMEZONE",
4607
<a href="#METHOD">METHOD</a> property (value PUBLISH etc.) and the (also auto created) <a href="#UID">UID</a> property.
4608
</p>
4609
<p>The value type for DTSTAMP is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
4610
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
4611
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) DTSTAMP values.</p>
4612
<br>
4613
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4614

    
4615

    
4616
<a name="DTSTART"></a><h3>3.2.17 DTSTART</h3>
4617
<p>
4618
This property specifies when the <strong>calendar</strong> component begins.
4619
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
4620
<a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
4621
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
4622
</p>
4623
<p>The default value type for DTSTART is DATE-TIME, can be set to a DATE value type.</p>
4624
<p>
4625
For an &quot;all-day event&quot; and using timeless dates, example (2007-12-01)<br>
4626
DTSTART;VALUE=DATE:20071201<br>
4627
DTEND;VALUE=DATE:20071202. // <span class="comment">opt., in effect midnight of the day <u>before</u> the date!!</span>
4628
</p>
4629
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
4630
<br>
4631
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4632

    
4633

    
4634
<a name="DUE"></a><h3>3.2.18 DUE</h3>
4635
<p>
4636
This property defines the date and time when a <a href="#VTODO">VTODO</a> is expected to be completed
4637
and is OPTIONAL and MUST NOT occur more than once and only if DURATION NOT occurs.
4638
</p>
4639
<p>
4640
The default value type for DUE is DATE-TIME, can be set to a DATE value type.
4641
</p>
4642
<p class="quotes">
4643
The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
4644
</p>
4645
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
4646
<br>
4647
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4648

    
4649

    
4650
<a name="DURATION"></a><h3>3.2.19 DURATION</h3>
4651
<p>The property specifies a positive duration of time.</p>
4652
<dl>
4653
<dt>In a <a href="#VEVENT">VEVENT</a>
4654
<dd>it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DTEND. If one occurs, so MUST NOT the other.<br>
4655
<dt>In a <a href="#VTODO">VTODO</a>
4656
<dd>it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DUE. If one occurs, so MUST NOT the other.<br>
4657
<dt>In a <a href="#VFREEBUSY">VFREEBUSY</a>
4658
<dd>it is OPTIONAL and MUST NOT occur more than once. ([RFC2445])<br>
4659
<dd>it can not appear. ([RFC5545])<br>
4660
<dt>In a <a href="#VALARM">VALARM</a>
4661
<dd>it is OPTIONAL and MUST NOT occur more than once and MUST occur in pair with TRIGGER. If one occurs, so MUST  the other.
4662
</dl>
4663
<p>
4664
If any hour/minute/second duration part is set, all parts are included in output (ex. one hour duration: &quot;PT1H0M0S&quot;).
4665
</p>
4666
<h5>Create DURATION</h5>
4667
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4668
<p class="label">Format</p>
4669
<p class="format">calendarComponent::createDuration()</p>
4670
<p class="label">Example</p>
4671
<p class="example">&lt;?php
4672
.. .
4673
$str = $component-&gt;createDuration();
4674
.. .
4675
</p>
4676
<h5>Delete DURATION</h5>
4677
<p>Remove DURATION from component.</p>
4678
<p class="label">Format</p>
4679
<p class="format">calendarComponent::deleteProperty( &quot;DURATION&quot; )</p>
4680
<p class="label">Example</p>
4681
<p class="example">&lt;?php
4682
.. .
4683
$valarm-&gt;deleteProperty( &quot;DURATION&quot; );
4684
.. .
4685
</p>
4686
<h5>Get DURATION</h5>
4687
<p>If set, returns property value, otherwise FALSE.</p>
4688
<p class="label">Format 1</p>
4689
<p class="format">calendarComponent::getProperty( &quot;DURATION&quot; )</p>
4690
<p class="comment">output = duration<sup>1</sup></p>
4691
<p class="label">Format 2</p>
4692
<p class="format">calendarComponent::getProperty( &quot;DURATION&quot;, FALSE , TRUE )</p>
4693
<p class="comment">output = array( &quot;value&quot;  =&gt; duration<sup>1</sup>
4694
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4695
<p class="label">Example</p>
4696
<p class="example">&lt;?php
4697
.. .
4698
$duration = $vtodo-&gt;getProperty( &quot;duration&quot; );
4699
.. .
4700
</p>
4701
<p class="label">option</p>
4702
<p>
4703
If a 4th argument is used and set to TRUE, returned output is in a DATE-TIME
4704
 output format (like <a href="#DTEND">DTEND</a> / <a href="#DUE">DUE</a>), based on
4705
<a href="#DTSTART">DTSTART</a> value with the added DURATION value (incl. opt. timezone).
4706
</p>
4707
<h5>Set DURATION</h5>
4708
<p>Insert property value.</p>
4709
<p class="label">Format</p>
4710
<p class="format">calendarComponent::setProperty( &quot;duration&quot;, duration [, xparams ] )</p>
4711
<p class="comment">
4712
duration<sup>1</sup>  = (array) ( &quot;week&quot; =&gt; (int) week )
4713
duration<sup>1</sup>  = array ( &quot;day&quot;   =&gt; (int) day )
4714
                  [, &quot;hour&quot;  =&gt; (int) hour
4715
                   , &quot;min&quot;   =&gt; (int) min
4716
                   , &quot;sec&quot;   =&gt; (int) sec ])
4717
duration   = (array) ( &quot;sec&quot; =&gt; (int) sec )
4718
duration   = (array) ( (int) week/false
4719
                    [, (int) day/false
4720
                    [, (int) hour
4721
                     , (int) min
4722
                     , (int) sec ]] )
4723
duration   = (int) week/false
4724
          [, (int) day/false
4725
          [, (int) hour
4726
           , (int) min
4727
           , (int) sec ]]
4728
duration   = (string) dur-value = [&quot;+&quot;] &quot;P&quot; (dur-date/dur-time/dur-week)
4729
dur-date   = dur-day [dur-time]
4730
dur-time   = &quot;T&quot; (dur-hour / dur-minute / dur-second)
4731
dur-week   = 1*DIGIT &quot;W&quot;
4732
dur-hour   = 1*DIGIT &quot;H&quot; [dur-minute]
4733
dur-minute = 1*DIGIT &quot;M&quot; [dur-second]
4734
dur-second = 1*DIGIT &quot;S&quot;
4735
dur-day    = 1*DIGIT &quot;D&quot;
4736
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
4737
</p>
4738
<p class="label">Example 1</p>
4739
<p>One day duration.</p>
4740
<p class="example">&lt;?php
4741
.. .
4742
$vtodo-&gt;setProperty &quot;duration&quot; , array( &quot;day&quot; =&gt; 1 ));
4743
.. .
4744
</p>
4745
<p class="label">Example 2</p>
4746
<p>Four hours duration.</p>
4747
<p class="example">&lt;?php
4748
.. .
4749
$vtodo-&gt;setProperty( &quot;duration&quot;, &quot;PT4H&quot; );
4750
.. .
4751
</p>
4752
<br>
4753
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4754

    
4755

    
4756
<a name="EXDATE"></a><h3>3.2.20 EXDATE</h3>
4757
<p>
4758
This property defines the list of date/time exceptions for a recurring <strong>calendar</strong> component and is OPTIONAL
4759
and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
4760
</p>
4761
<p>The default value type for EXDATE is DATE-TIME, can be set to a DATE value type.</p>
4762
<h5>Create EXDATE</h5>
4763
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4764
<p class="label">Format</p>
4765
<p class="format">calendarComponent::createExdate()</p>
4766
<p class="label">Example</p>
4767
<p class="example">&lt;?php
4768
.. .
4769
$str = $component-&gt;createExdate();
4770
.. .
4771
</p>
4772
<h5>Delete EXDATE</h5>
4773
<p>Remove EXDATE from component.</p>
4774
<p class="label">Format</p>
4775
<p class="format">calendarComponent::deleteProperty( &quot;EXDATE&quot; )</p>
4776
<p class="label">Example 1</p>
4777
<p class="example">&lt;?php
4778
.. .
4779
$vtodo-&gt;deleteProperty( &quot;EXDATE&quot; );
4780
.. .
4781
</p>
4782
<p class="label">Example 2</p>
4783
<P>Delete EXDATE property no 2.</p>
4784
<p class="example">&lt;?php
4785
.. .
4786
$vjournal-&gt;deleteProperty( &quot;EXDATE&quot;, 2 );
4787
.. .
4788
</p>
4789
<p class="label">Example 3</p>
4790
<p>Deleting all EXDATE properties.</p>
4791
<p class="example">&lt;?php
4792
.. .
4793
while( $vjournal-&gt;deleteProperty( &quot;EXDATE&quot; ))
4794
  continue;
4795
.. .
4796
</p>
4797
<h5>Get EXDATE</h5>
4798
<p>If set, returns property value, otherwise FALSE.</p>
4799
<p class="label">Format 1</p>
4800
<p class="format">calendarComponent::getProperty( &quot;EXDATE&quot; )<p>
4801
<p class="comment">output = exdates<sup>1</sup></p>
4802
<p class="label">Format 2</p>
4803
<p class="format">calendarComponent::getProperty( &quot;exdate&quot;, propOrderNo/FALSE, TRUE )</p>
4804
<p class="comment">propOrderNo = (int) specific property value</p>
4805
<p class="comment">output = array( &quot;value&quot;  =&gt; exdates<sup>1</sup>
4806
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4807
<p class="label">Format 3</p>
4808
<p class="format">calendarComponent::getProperty( &quot;EXDATE&quot;, propOrderNo )</p>
4809
<p class="comment">propOrderNo = (int) specific property value</p>
4810
<p class="comment">Get propOrderNo EXDATE</p>
4811
<p class="label">Example</p>
4812
<p class="example">&lt;?php
4813
.. .
4814
$exdate = $vtodo-&gt;getProperty( &quot;exdate&quot; );
4815
.. .
4816
</p>
4817
<h5>Set EXDATE</h5>
4818
<p>Insert property value.</p>
4819
<p>The value type for EXDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
4820
<p>
4821
If DATE value type is set in params (&quot;VALUE&quot; = &quot;DATE&quot;), all timezone or offset in dates are ignored.<br>
4822
If no &quot;VALUE&quot; value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
4823
</p>
4824
<p>
4825
If &quot;TZID&quot; is set in params,
4826
all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
4827
If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
4828
If no &quot;TZID&quot; is set in params and timezone in 1st date, all remaining dates are within this timezone and param &quot;TZID&quot; is set.<br>
4829
If none of the above rules are applicable, DATE-TIME and local date is set default.
4830
</p>
4831
<p>
4832
Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
4833
</p>
4834
<p>EXDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
4835
<p>
4836
In spite of the fact that EXDATE may contain a (comma separated) list of values,
4837
a strong recommendation is to split a EXDATE &quot;list&quot; into multiple single EXDATE entries.
4838
</p>
4839
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
4840
<p class="label">Format</p>
4841
<p class="format">calendarComponent::setProperty( &quot;exdate&quot;, exdates [, params [, propOrderNo ]] )</p>
4842
<p class="comment">exdates<sup>1</sup>      = (array) ( date *[, date ] )
4843
date          = array( (int) year
4844
                     , (int) month
4845
                     , (int) day
4846
                    [, (int) hour
4847
                     , (int) min
4848
                     , (int) sec
4849
                    [, tz ]] )
4850
date<sup>1</sup>         = (array) ( &quot;year&quot;  =&gt; (int) year
4851
                        , &quot;month&quot; =&gt; (int) month
4852
                        , &quot;day&quot;   =&gt; (int) day
4853
                       [, &quot;hour&quot;  =&gt; (int) hour
4854
                        , &quot;min&quot;   =&gt; (int) min
4855
                        , &quot;sec&quot;   =&gt; (int) sec
4856
                       [, &quot;tz&quot;    =&gt; tz ]] )
4857
date          = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [, &quot;tz&quot; =&gt; tz])
4858
                // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4859
date          = (string) date/datetime string<sup>*</sup>
4860
tz            = (string) &lt;timezone identifier&gt; / offset
4861
                // <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
4862
offset        = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4863
params<sup>2</sup>       = (array) ([(datetimeparam/dateparam)&nbsp;/ tzidparam] *[,xparams])
4864
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">default, output as date-time</span>
4865
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="comment">output as DATE</span>
4866
tzidparam     = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
4867
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4868
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4869
<br>date/datetime string<sup>*</sup> recommended formats
4870
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
4871
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
4872
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
4873
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
4874
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
4875
    trailing characters (digits), if exists, will be interpreted as offset/timezone
4876
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
4877
    <span class="commsnt">(notice <a href="#date_restriction">date restriction</a>)</span></p>
4878
<p class="label">Example 1</p>
4879
<p class="example">&lt;?php
4880
.. .
4881
$vevent-&gt;setProperty( &quot;exdate&quot;, array( array( 2006, 8, 14, 16, 0, 0 ));
4882
                    <span class="comment">// exclude 2006-08-14 16.00.00 (local date) from recurrence pattern</span>
4883
.. .
4884
</p>
4885
<p class="label">Example 2</p>
4886
<p class="example">&lt;?php
4887
.. .
4888
$vevent-&gt;setProperty( &quot;exdate&quot;
4889
                    , array( array(&quot;year&quot; =&gt;,2006,&quot;month&quot; =&gt; 8,&quot;day&quot;=&gt; 11))
4890
                    , array( &quot;VALUE&quot; =&gt; &quot;DATE&quot; ));
4891
                   <span class="comment">// exclude 2006-08-11 from recurrence pattern;</span>
4892
.. .
4893
</p>
4894
<br>
4895
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4896

    
4897

    
4898
<a name="EXRULE"></a><h3>3.2.21 EXRULE</h3>
4899
<p>
4900
This property defines a rule or repeating pattern for an exception to a recurrence set and is OPTIONAL
4901
and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
4902
</p>
4903
<p>EXRULE is deprecated in [RFC5545]!</p>
4904
<h5>Create EXRULE</h5>
4905
<p>If set, returns [RFC2445] formatted string, otherwise FALSE.</p>
4906
<p class="label">Format</p>
4907
<p class="format">calendarComponent::createExrule()</p>
4908
<p class="label">Example</p>
4909
<p class="example">&lt;?php
4910
.. .
4911
$str = $component-&gt;createExrule();
4912
.. .
4913
</p>
4914
<h5>Delete EXRULE</h5>
4915
<p>Remove EXRULE from component.</p>
4916
<p class="label">Format</p>
4917
<p class="format">calendarComponent::deleteProperty( &quot;EXRULE&quot; )</p>
4918
<p class="label">Example 1</p>
4919
<p class="example">&lt;?php
4920
.. .
4921
$vtodo-&gt;deleteProperty( &quot;EXRULE&quot; );
4922
.. .
4923
</p>
4924
<p class="label">Example 2</p>
4925
<p>Delete EXRULE property no 2.</p>
4926
<p class="example">&lt;?php
4927
.. .
4928
$vjournal-&gt;deleteProperty( &quot;EXRULE&quot;, 2 );
4929
.. .
4930
</p>
4931
<p class="label">Example 3</p>
4932
<p>Deleting all EXRULE properties.</p>
4933
<p class="example">&lt;?php
4934
.. .
4935
while( $vjournal-&gt;deleteProperty( &quot;EXRULE&quot; ))
4936
  continue;
4937
.. .
4938
</p>
4939
<h5>Get EXRULE</h5>
4940
<p>If set, returns property value, otherwise FALSE.</p>
4941
<p class="label">Format 1</p>
4942
<p class="format">calendarComponent::getProperty( &quot;EXRULE&quot; )</p>
4943
<p class="comment">output = recur<sup>1</sup></p>
4944
<p class="label">Format 2</p>
4945
<p class="format">calendarComponent::getProperty( &quot;exrule&quot;, propOrderNo/FALSE, TRUE )</p>
4946
<p class="comment">propOrderNo = (int) specific property value</p>
4947
<p class="comment">output = array( &quot;value&quot;  =&gt; recur<sup>1</sup>
4948
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4949
<p class="label">Format 3</p>
4950
<p class="format">calendarComponent::getProperty( &quot;EXRULE&quot;, propOrderNo )</p>
4951
<p class="comment">propOrderNo = (int) specific property value</p>
4952
<p class="comment">Get propOrderNo EXRULE</p>
4953
<p class="label">Example</p>
4954
<p class="example">&lt;?php
4955
.. .
4956
$exrule = $vtodo-&gt;getProperty( &quot;exrule&quot; );
4957
.. .
4958
</p>
4959
<h5>Set EXRULE</h5>
4960
<p>
4961
Insert property value.
4962
Notice, use function <a href="#transformDateTime">transformDateTime</a>to change a local datetime to a UTC datetime.
4963
</p>
4964
<p>Parameters, will be ordered as prescribed in [RFC5545].</p>
4965
<p class="label">Format</p>
4966
<p class="format">calendarComponent::setProperty( &quot;exrule&quot;, recur [, xparams [, propOrderNo ]] )</p>
4967
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
4968
<p class="comment">recur<sup>1</sup>      = (array) ( "FREQ" =&gt; freq
4969
     // <span class="comment">either UNTIL or COUNT may appear in a &quot;recur&quot;,
4970
        but UNTIL and COUNT MUST NOT occur in the same &quot;recur&quot;</span>
4971
                  [, &quot;UNTIL&quot; &quot;=&gt;&quot; >enddate ]
4972
                  [, &quot;COUNT&quot; &quot;=&gt;&quot; 1*DIGIT ]
4973
     // <span class="comment">the rest of these keywords are optional,
4974
        but MUST NOT occur more than once</span>
4975
                  [, &quot;INTERVAL&quot;   &quot;=&gt;&quot; 1*DIGIT ]
4976
                  [, &quot;BYSECOND&quot;   &quot;=&gt;&quot; byseclist ]
4977
                  [, &quot;BYMINUTE&quot;   &quot;=&gt;&quot; byminlist ]
4978
                  [, &quot;BYHOUR&quot;     &quot;=&gt;&quot; byhrlist ]
4979
                  [, &quot;BYDAY&quot;      &quot;=&gt;&quot; bywdaylist ]
4980
                  [, &quot;BYMONTHDAY&quot; &quot;=&gt;&quot; bymodaylist ]
4981
                  [, &quot;BYYEARDAY&quot;  &quot;=&gt;&quot; byyrdaylist ]
4982
                  [, &quot;BYWEEKNO&quot;   &quot;=&gt;&quot; bywknolist ]
4983
                  [, &quot;BYMONTH&quot;    &quot;=&gt;&quot; bymolist ]
4984
                  [, &quot;BYSETPOS&quot;   &quot;=&gt;&quot; bysplist ]
4985
                  [, &quot;WKST&quot;       &quot;=&gt;&quot; weekday ]
4986
                  [, x-name       &quot;=&gt;&quot; (string) text ] )
4987
freq        = &quot;SECONDLY&quot; /
4988
              &quot;MINUTELY&quot; /
4989
              &quot;HOURLY&quot;   /
4990
              &quot;DAILY&quot;    /
4991
              &quot;WEEKLY&quot;   /
4992
              &quot;MONTHLY&quot;  /
4993
              &quot;YEARLY&quot;
4994
enddate     = date // <span class="comment">a DATE value or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value</span>
4995
date        = (array) ( &quot;year&quot;  =&gt; (int) year
4996
                      , &quot;month&quot; =&gt; (int) month
4997
                      , &quot;day&quot;   =&gt; (int) day
4998
                     [, &quot;hour&quot;  =&gt; (int) hour
4999
                      , &quot;min&quot;   =&gt; (int) min
5000
                      , &quot;sec&quot;   =&gt; (int) sec ])
5001
date        = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5002
date        = (string) date/datetime string<sup>*</sup>
5003
byseclist   = seconds
5004
byseclist   = (array) (seconds *(, seconds ))
5005
seconds     = 1DIGIT / 2DIGIT ;0 to 59
5006
byminlist   = minutes
5007
byminlist   = (array) ( minutes *(, minutes ))
5008
minutes     = 1DIGIT / 2DIGIT ;0 to 59
5009
byhrlist    = hour
5010
byhrlist    = (array) ( hour *(, hour ))
5011
hour        = 1DIGIT / 2DIGIT ;0 to 23
5012
bywdaylist  = weekdaynum
5013
bywdaylist  = (array) ( weekdaynum *("," weekdaynum ))
5014
weekdaynum  = (array) ( [([plus] ordwk / minus ordwk)], &quot;DAY&quot; =&gt; weekday )
5015
plus        = &quot;+&quot;
5016
minus       = &quot;-&quot;
5017
ordwk       = 1DIGIT / 2DIGIT ;1 to 53
5018
weekday     = &quot;SU&quot; / &quot;MO&quot; / &quot;TU&quot; / &quot;WE&quot; / &quot;TH&quot; / &quot;FR&quot; / &quot;SA&quot;
5019
                ; Corresponding to
5020
                ; SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
5021
                ; FRIDAY and SATURDAY days of the week.
5022
bymodaylist = monthdaynum
5023
bymodaylist = (array) ( monthdaynum *(, monthdaynum ))
5024
monthdaynum = ( [plus] ordmoday ) / ( minus ordmoday )
5025
ordmoday    = 1DIGIT / 2DIGIT ;1 to 31
5026
byyrdaylist = yeardaynum
5027
byyrdaylist = (array) ( yeardaynum *(, yeardaynum ))
5028
yeardaynum  = ( [plus] ordyrday ) / ( minus ordyrday )
5029
ordyrday    = 1DIGIT / 2DIGIT / 3DIGIT ;1 to 366
5030
bywknolist  = weeknum
5031
bywknolist  = (array) ( weeknum *(, weeknum ))
5032
weeknum     = ( [plus] ordwk ) / ( minus ordwk )
5033
bymolist    = monthnum
5034
bymolist    = (array) ( monthnum *(, monthnum ))
5035
monthnum    = 1DIGIT / 2DIGIT ;1 to 12
5036
bysplist    = setposday
5037
bysplist    = (array) ( setposday *(, setposday ))
5038
setposday   = yeardaynum
5039
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5040
propOrderNo = (int) order number                              // <span class="comment">1=1st, 2=2nd etc</span>
5041
<br>date/datetime string<sup>*</sup> recommended formats
5042
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
5043
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
5044
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
5045
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
5046
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
5047
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
5048
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
5049
<p class="label">Example</p>
5050
<p class="example">&lt;?php
5051
.. .
5052
$vevent-&gt;setProperty(&nbsp;&quot;Exrule&quot;
5053
             ,&nbsp;array( &quot;FREQ&quot;       =&gt; &quot;MONTHLY&quot;
5054
                    , &quot;UNTIL&quot;      =&gt; &quot;20060831&quot;
5055
   // <span class="comment">DATE / DATE-TIME in <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> format; string/array, see <a class="ref" href="#CREATED">CREATED</a> format</span>
5056
                    , &quot;INTERVAL&quot;   =&gt; 2
5057
                    , &quot;WKST&quot;       =&gt; &quot;SU&quot;
5058
                    , &quot;BYSECOND&quot;   =&gt; 2
5059
                    , &quot;BYMINUTE&quot;   =&gt; array( 2, -4, 6 )                // (*)
5060
                    , &quot;BYHOUR&quot;     =&gt; array( 2, 4, -6 )                // (*)
5061
                    , &quot;BYMONTHDAY&quot; =&gt; -2                               // (*)
5062
                    , &quot;BYYEARDAY&quot;  =&gt; 2                                // (*)
5063
                    , &quot;BYWEEKNO&quot;   =&gt; array( 2, -4, 6 )                // (*)
5064
                    , &quot;BYMONTH&quot;    =&gt; 2                                // (*)
5065
                    , &quot;BYSETPOS&quot;   =&gt; array( 2, -4, 6 )                // (*)
5066
                    , &quot;BYday&quot;      =&gt; array( array(-2, &quot;DAY&quot; =&gt; &quot;WE&quot; )
5067
                                           , array( 3, &quot;DAY&quot; =&gt; &quot;TH&quot;)
5068
                                           , array( 5, &quot;DAY&quot; =&gt; &quot;FR&quot;)
5069
                                           , array(    &quot;DAY&quot; =&gt; &quot;MO&quot;)) // (**)
5070
                    , &quot;X-NAME&quot;     =&gt; &quot;x-value&quot; )
5071
            , array( &quot;key&quot;   =&gt; &quot;xparamValue&quot; ));
5072

    
5073
$vtodo-&gt;setProperty( >&quot;exrule&quot;
5074
            , array( &quot;FREQ&quot;        =&gt; &quot;WEEKLY&quot;
5075
                   , &quot;COUNT&quot;       =&gt; 2
5076
                   , &quot;INTERVAL&quot;    =&gt; 2
5077
                   , &quot;WKST&quot;        =&gt; &quot;SU&quot;
5078
                   , &quot;BYSECOND&quot;    =&gt; array( -2, 4, 6 )                // (*)
5079
                   , &quot;BYMINUTE&quot;    =&gt; -2                               // (*)
5080
                   , &quot;BYHOUR&quot;      =&gt; 2                                // (*)
5081
                   , &quot;BYMONTHDAY&quot;  =&gt; array( 2, -4, 6 )                // (*)
5082
                   , &quot;BYYEARDAY&quot;   =&gt; array( -2, 4, 6 )                // (*)
5083
                   , &quot;BYWEEKNO&quot;    =&gt; -2                               // (*)
5084
                   , &quot;BYMONTH&quot;     =&gt; array( 2, 4, -6 )                // (*)
5085
                   , &quot;BYSETPOS&quot;    =&gt; -2                               // (*)
5086
                   , &quot;BYday&quot;       =&gt; array( 5, &quot;DAY&quot; =&gt; &quot;WE&quot; )        // (**)
5087
                   , &quot;X-NAME&quot;      =&gt; &quot;x-value&quot;  )
5088
            , array( &quot;key&quot;   =&gt; &quot;xparamValue&quot; ));
5089
  // <span class="comment">(*)  single value/array of values</span>
5090
  // <span class="comment">(**) single value array /array of arrays</span>
5091
.. .
5092
</p>
5093
<br>
5094
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5095

    
5096

    
5097
<a name="FREEBUSY_PROP"></a><h3>3.2.22 FREEBUSY</h3>
5098
<p>
5099
The property defines one or more free or busy time intervals in a <a href="#VFREEBUSY">VFREEBUSY</a>
5100
<strong>calendar</strong> component.
5101
<p>
5102
<p>The value type for FREEBUSY is PERIOD. A PERIOD is a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/DATE-TIME or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/duration.</p>
5103
<h5>Create FREEBUSY</h5>
5104
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5105
<p class="label">Format</p>
5106
<p class="format">calendarComponent::createFreebusy()</p>
5107
<p class="label">Example</p>
5108
<p class="example">&lt;?php
5109
.. .
5110
$str = $component-&gt;createfreebusy();
5111
.. .
5112
</p>
5113
<h5>Delete FREEBUSY</h5>
5114
<p>Remove FREEBUSY from component.</p>
5115
<p class="label">Format</p>
5116
<p class="format">calendarComponent::deleteProperty( &quot;FREEBUSY&quot; )</p>
5117
<p class="label">Example 1</p>
5118
<p>Delete (single/first) FREEBUSY property</p>
5119
<p class="example">&lt;?php
5120
.. .
5121
$vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot; );
5122
.. .
5123
</p>
5124
<p class="label">Example 2</p>
5125
<p>Delete FREEBUSY property no 2.</p>
5126
<p class="example">&lt;?php
5127
.. .
5128
$vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot;, 2 );
5129
.. .
5130
</p>
5131
<p class="label">Example 3</p>
5132
<p>Deleting all FREEBUSY properties.</p>
5133
<p class="example">&lt;?php
5134
.. .
5135
while( $vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot; ))
5136
  continue;
5137
.. .
5138
</p>
5139
<h5>Get FREEBUSY</h5>
5140
<p>If set, returns property value, otherwise FALSE.</p>
5141
<p class="label">Format 1</p>
5142
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot; )</p>
5143
<p class="comment">output = array( &quot;fbtype&quot; =&gt; freebusytype<sup>1</sup> , periods<sup>2</sup> )</p>
5144
<p class="label">Format 3</p>
5145
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot;, propOrderNo/FALSE , TRUE )</p>
5146
<p class="comment">propOrderNo = (int) specific property value</p>
5147
<p class="comment">output = array( &quot;value&quot; =&gt; array(&quot;fbtype&quot; =&gt; freebusytype<sup>1</sup> ,periods<sup>2</sup>)
5148
              , &quot;params&quot; =&gt; xparams<sup>3</sup> )</p>
5149
<p class="label">Format 3</p>
5150
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot;, propOrderNo )</p>
5151
<p class="comment">propOrderNo = (int) specific property value</p>
5152
<p class="comment">Get propOrderNo FREEBUSY</p>
5153
<p class="label">Example</p>
5154
<p class="example">&lt;?php
5155
.. .
5156
$freebusy = $vfreebusy-&gt;getProperty( &quot;FREEBUSY&quot; );
5157
.. .
5158
</p>
5159
<h5>Set FREEBUSY</h5>
5160
Insert property value. A FREEBUSY input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
5161
<p class="label">Format</p>
5162
<p class="format">calendarComponent::setProperty( &quot;freebusy&quot;,freebusytype,fbperiods [,xparams [,propOrderNo ]] )</p>
5163
<p class="comment">freebusytype<sup>1</sup>     = one of &quot;FREE&quot;
5164
                        / &quot;BUSY&quot; <b>Default</b>
5165
                        / &quot;BUSY-UNAVAILABLE&quot;
5166
                        / &quot;BUSY-TENTATIVE&quot;
5167
                        /  x-name
5168
fbperiods         = (array) ( periods<sup>2</sup> )&nbsp;
5169
periods<sup>2</sup>          = (array) ( startdate, enddate/duration ) /
5170
                    (array) ( *[, (array) ( startdate, enddate/duration )] )
5171
startdate/enddate = (array) ( (int) year
5172
                            , (int) month
5173
                            , (int) day
5174
                            , (int) hour
5175
                            , (int) min
5176
                            , (int) sec )
5177
startdate/enddate = (array) ( &quot;year&quot;  =&gt; (int) year
5178
                            , &quot;month&quot; =&gt; (int) month
5179
                            , &quot;day&quot;   =&gt; (int) day
5180
                            , &quot;hour&quot;  =&gt; (int) hour
5181
                            , &quot;min&quot;   =&gt; (int) min
5182
                            , &quot;sec&quot;   =&gt; (int) sec ) // <span class="comment">output format</span>
5183
startdate/enddate = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5184
startdate/enddate = (string) datetime string<sup>*</sup>
5185
                    // <span class="comment">startdate/enddate MUST be an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5186
duration          = (array) ( (int) week / FALSE
5187
                           [, (int) day / FALSE
5188
                            , (int) hour
5189
                            , (int) min
5190
                            , (int) sec] )
5191
duration          = (array) ( &quot;week&quot; =&gt; (int) week / FALSE
5192
                           [, &quot;day&quot;  =&gt; (int) day / FALSE
5193
                           [, &quot;hour&quot; =&gt; (int) hour
5194
                            , &quot;min&quot;  =&gt; (int) min
5195
                            , &quot;sec&quot;  =&gt; (int) sec ]] ); // <span class="comment">output format</span>
5196
duration          = (array) ( &quot;sec&quot;  =&gt; (int) sec )
5197
duration          = (string) dur-value
5198
                        = ([&quot;+&quot;]/&quot;-&quot;) &quot;P&quot; (dur-date/dur-time/dur-week)
5199
dur-date          = dur-day [dur-time]
5200
dur-time          = &quot;T&quot; (dur-hour / dur-minute / dur-second)
5201
dur-week          = 1*DIGIT &quot;W&quot;
5202
dur-hour          = 1*DIGIT &quot;H&quot; [dur-minute]
5203
dur-minute        = 1*DIGIT &quot;M&quot; [dur-second]
5204
dur-second        = 1*DIGIT &quot;S&quot;
5205
dur-day           = 1*DIGIT &quot;D&quot;
5206
xparams<sup>3 </sup>          = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5207
propOrderNo       = (int) order number                              // <span class="comment">1=1st, 2=2nd etc</span>
5208
<br>date/datetime string<sup>*</sup> recommended formats
5209
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
5210
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
5211
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
5212
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
5213
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
5214
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
5215
<p class="label">Example</p>
5216
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
5217
<p class="example">&lt;?php
5218
.. .
5219
$fdate1 = array ( 2001, 1, 1, 1, 1, 1 );
5220
alt.
5221
$fdate1 = array ( &quot;year&quot;  =&gt; 2001
5222
                , &quot;month&quot; =&gt; 1
5223
                , &quot;day&quot;   =&gt; 1
5224
                , &quot;hour&quot;  =&gt; 1
5225
                , &quot;min&quot;   =&gt; 1
5226
                , &quot;sec&quot;   =&gt; 1 );
5227
$fdate2 = array ( 2002, 2, 2, 2, 2, 2 );
5228
$fdate3 = array ( 2003, 3, 3, 3, 3, 3 );
5229
$fdate4 = &quot;4 April 2005 4:4:4&quot;;
5230
$fdate7 = array ( &quot;year&quot;  =&gt; 2007
5231
                , &quot;month&quot; =&gt; 7
5232
                , &quot;day&quot;   =&gt; 7 );
5233
$fdur6  = array ( &quot;week&quot; =&gt; 0
5234
                , &quot;day&quot;  =&gt; 5
5235
                , &quot;hour&quot; =&gt; 5
5236
                , &quot;min&quot;  =&gt; 5
5237
                , &quot;sec&quot;  =&gt; 5 );
5238
$fdur7  = array ( 0, 0, 6 ); // <span class="comment">duration for 6 hours</span>
5239
$fdur8  = &quot;P2D&quot;;             // <span class="comment">duration two days</span>
5240
$freebusy-&gt;setProperty &quot;freebusy&quot;
5241
                      , &quot;FREE&quot;
5242
                      , array( array( $fdate1, $fdate2 )
5243
                             , array( $fdate3, $fdur6 )
5244
                             , array( $fdate4, $fdate5 )));
5245
$freebusy-&gt;setProperty(&quot;freebusy&quot;
5246
                      , &quot;Busy&quot;
5247
                      , array( array( array( $fdate1, $fdate2 )
5248
                             , array( $fdate3, $fdur8 )
5249
                             , array( $fdate4, $fdur7 )
5250
                             , array( $fdate1, $fdate3 )));
5251
.. .
5252
</p>
5253
<br>
5254
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5255

    
5256

    
5257
<a name="GEO"></a><h3>3.2.23 GEO</h3>
5258
<p>
5259
This property specifies information related to the global position for the activity specified by
5260
<a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components and is OPTIONAL and MUST NOT occur more than once.
5261
</p>
5262
<p>Value type for latitude and longitude is FLOAT.</p>
5263
<p class="quotes">Values for latitude and longitude shall be expressed as decimal
5264
fractions of degrees. Whole degrees of latitude shall be represented by
5265
a two-digit decimal number ranging from 0 through 90. Whole degrees
5266
of longitude shall be represented by a decimal number ranging from 0
5267
through 180. When a decimal fraction of a degree is specified, it shall
5268
be separated from the whole number of degrees by a decimal point.</p>
5269
<p>The output (float) latitude and longitude values are presented up to six decimals.</p>
5270
<p>Using the non-standard directive &quot;GEOLOCATION&quot; when calling iCalcreator
5271
 <a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
5272
 getProperty method, iCalcreator returns output supporting<br>
5273
 ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;<br>
5274
 by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
5275
 (only if <a href="#GEO">GEO</a> is set).
5276
</p>
5277
<h5>Create GEO</h5>
5278
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5279
<p class="label">Format</p>
5280
<p class="format">calendarComponent::createGeo()</p>
5281
<p class="label">Example</p>
5282
<p class="example">&lt;?php
5283
.. .
5284
$str = $component-&gt;createGeo();
5285
.. .
5286
</p>
5287
<h5>Delete GEO</h5>
5288
<p>Remove GEO from component.</p>
5289
<p class="label">Format</p>
5290
<p class="format">calendarComponent::deleteProperty( &quot;GEO&quot; )</p>
5291
<p class="label">Example</p>
5292
<p class="example">&lt;?php
5293
.. .
5294
$vevent-&gt;deleteProperty( &quot;GEO&quot; );
5295
.. .
5296
</p>
5297
<h5>Get GEO</h5>
5298
<p>If set, returns GEO property value (latitude/longitude) as prescribed in [RFC5545], otherwise FALSE.</p>
5299
<p class="label">Format 1</p>
5300
<p class="format">calendarComponent::getProperty( &quot;GEO&quot; )</p>
5301
<p class="comment">output = array( &quot;latitude&quot;  =&gt; &lt;latitude&gt;
5302
              , &quot;longitude&quot; =&gt; &lt;longitude&gt;))</p>
5303
<p class="label">Format 2</p>
5304
<p class="format">calendarComponent::getProperty( &quot;GEO&quot;, FALSE , TRUE )</p>
5305
<p class="comment">output = array( &quot;value&quot; =&gt; array ( &quot;latitude&quot;  =&gt; &lt;latitude&gt;
5306
                                 , &quot;longitude&quot; =&gt; &lt;longitude&gt;))
5307
              , &quot;params&quot; =&gt; xparams<sup>1</sup> )</p>
5308
<p class="label">Example</p>
5309
<p class="example">&lt;?php
5310
.. .
5311
$geo = $vevent-&gt;getProperty( &quot;GEO&quot; );
5312
.. .
5313
</p>
5314
<h5>Set GEO</h5>
5315
<p>Insert property value.</p>
5316
<p class="label">Format</p>
5317
<p class="format">calendarComponent::setProperty( &quot;geo&quot;, latitude, longitude [, xparams ] )</p>
5318
<p class="comment">latitude  = (float) latitude
5319
longitude = (float) longitude
5320
xparams<sup>1</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5321
</p>
5322
<p class="label">Example</p>
5323
<p class="example">&lt;?php
5324
.. .
5325
$vevent-&gt;setProperty( &quot;geo&quot;, 11.23456, -23.45678 );
5326
.. .
5327
</p>
5328
<br>
5329
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5330

    
5331

    
5332
<a name="LAST-MODIFIED"></a><h3>3.2.24 LAST-MODIFIED</h3>
5333
<p>
5334
The property specifies the date and time that the information associated with the <strong>calendar</strong>
5335
component was last revised in the <strong>calendar</strong> store.
5336
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
5337
<a href="#VTODO">VTODO</a>,  <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VTIMEZONE">VTIMEZONE</a> components.
5338
</p>
5339
<p>The value type for LAST-MODIFIED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
5340
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
5341
<br>
5342
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5343

    
5344

    
5345
<a name="LOCATION"></a><h3>3.2.25 LOCATION</h3>
5346
<p>
5347
The property defines the intended venue for the activity defined by a <strong>calendar</strong> component.
5348
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
5349
</p>
5350
<p>The value type for LOCATION is TEXT.</p>
5351
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) LOCATION values.</p>
5352
<p>Using the non-standard directive &quot;GEOLOCATION&quot; when calling iCalcreator
5353
 <a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
5354
 getProperty method, iCalcreator returns output supporting<br>
5355
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
5356
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
5357
 (only if <a href="#GEO">GEO</a> is set).
5358
</p>
5359
<h5>Create LOCATION</h5>
5360
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5361
<p class="label">Format</p>
5362
<p class="format">calendarComponent::createLocation()</p>
5363
<p class="label">Example</p>
5364
<p class="example">&lt;?php
5365
.. .
5366
$str = $component-&gt;createLocation();
5367
.. .
5368
</p>
5369
<h5>Delete LOCATION</h5>
5370
<p>Remove LOCATION from component.</p>
5371
<p class="label">Format</p>
5372
<p class="format">calendarComponent::deleteProperty( &quot;LOCATION&quot; )</p>
5373
<p class="label">Example</p>
5374
<p class="example">&lt;?php
5375
.. .
5376
$vevent-&gt;deleteProperty( &quot;LOCATION&quot; );
5377
.. .
5378
</p>
5379
<h5>Get LOCATION</h5>
5380
<p>If set, returns property value, otherwise FALSE.</p>
5381
<p class="label">Format 1</p>
5382
<p class="format">calendarComponent::getProperty( &quot;LOCATION&quot; )</p>
5383
<p class="comment">output = location<sup>1</sup></p>
5384
<p class="label">Format 2</p>
5385
<p class="format">calendarComponent::getProperty( &quot;LOCATION&quot;, FALSE , TRUE )</p>
5386
<p class="comment">output = array( &quot;value&quot;  =&gt; location<sup>1</sup>
5387
              , &quot;params&quot; =&gt; param<sup>2</sup> )</p>
5388
<p class="label">Example</p>
5389
<p class="example">&lt;?php
5390
.. .
5391
$location = $vevent-&gt;getProperty( &quot;LOCATION&quot; );
5392
.. .
5393
</p>
5394
<h5>Set LOCATION</h5>
5395
<p>Insert property value.</p>
5396
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
5397
<p class="label">Format</p>
5398
<p class="format">calendarComponent::setProperty( &quot;location&quot;, location [, param] )</p>
5399
<p class="comment">location<sup>1</sup> = (string) Value type TEXT
5400
params<sup>2</sup>   = (array) ( [&quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
5401
                  [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
5402
                 *[, xparams ]
5403
xparams   = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5404
lang<sup>*</sup>     = as defined in [RFC5646]</p>
5405
<p class="label">Example</p>
5406
<p class="example">&lt;?php
5407
.. .
5408
$vevent-&gt;setProperty( &quot;location&quot;, &quot;Buckingham Palace&quot; );
5409
.. .
5410
</p>
5411
<br>
5412
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5413

    
5414

    
5415
<a name="ORGANIZER"></a><h3>3.2.26 ORGANIZER</h3>
5416
<p>
5417
The property defines the organizer for a <strong>calendar</strong> component and is OPTIONAL
5418
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
5419
<a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
5420
</p>
5421
<p>This value type for ORGANIZER is URI, a <strong>calendar</strong> user address.</p>
5422
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) ORGANIZER values.</p>
5423
<p>You can export <strong>calendar</strong> ORGANIZER values as <a href="#iCal2vCards">vCards</a>.
5424
<h5>Create ORGANIZER</h5>
5425
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5426
<p class="label">Format</p>
5427
<p class="format">calendarComponent::createOrganizer()</p>
5428
<p class="label">Example</p>
5429
<p class="example">&lt;?php
5430
.. .
5431
$str = $component-&gt;createOrganizer();
5432
.. .
5433
</p>
5434
<h5>Delete ORGANIZER</h5>
5435
<p>Remove ORGANIZER from component.</p>
5436
<p class="label">Format</p>
5437
<p class="format">calendarComponent::deleteProperty( &quot;ORGANIZER&quot; )</p>
5438
<p class="label">Example</p>
5439
<p class="example">&lt;?php
5440
.. .
5441
$vevent-&gt;deleteProperty( &quot;ORGANIZER&quot; );
5442
.. .
5443
</p>
5444
<h5>Get ORGANIZER</h5>
5445
<p>If set, returns property value, otherwise FALSE.</p>
5446
<p class="label">Format 1</p>
5447
<p class="format">calendarComponent::getProperty( &quot;ORGANIZER&quot; )</p>
5448
<p class="comment">output = organizer<sup>1</sup></p>
5449
<p class="label">Format 2</p>
5450
<p class="format">calendarComponent::getProperty( &quot;ORGANIZER&quot;, FALSE , TRUE )</p>
5451
<p class="comment">output = array( &quot;value&quot;  =&gt; organizer<sup>1</sup>
5452
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
5453
<p class="label">Example</p>
5454
<p class="example">&lt;?php
5455
.. .
5456
$organizer = $vevent-&gt;getProperty( &quot;ORGANIZER&quot; );
5457
.. .
5458
</p>
5459
<h5>Set ORGANIZER</h5>
5460
<p>Insert property value.
5461
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738), &quot;mailto:&quot; prefixed if missing.
5462
Also DIR parameter must be prefixed by protocol.
5463
SENT-BY parameter must use protocol &quot;mailto:&quot;, prefixed if missing.
5464
</p>
5465
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
5466
<p class="label">Format</p>
5467
<p class="format">calendarComponent::setProperty( &quot;organizer&quot;, organizer [, params] )</p>
5468
<p class="comment">organizer<sup>1</sup> = (string) a <strong>calendar</strong> user address (cal-address), a URI as defined by
5469
             [RFC 1738] or any other IANA registered form for a URI.
5470
params<sup>2</sup>    = (array) ( [ &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; (applies to the CN parameter value) ]
5471
                       [, &quot;CN&quot;      =&gt; (string) &quot;common name to be associated with the
5472
                                         <strong>calendar</strong> user specified by the property&quot;]
5473
                       [, &quot;DIR&quot;     =&gt; (string) &quot;reference to a directory entry associated
5474
                                         with the <strong>calendar</strong> user specified by the property&quot; ]
5475
                       [, &quot;SENT-BY&quot; =&gt; (string) (cal-address, above)
5476
                                         &quot;single <strong>calendar</strong> user that is acting on behalf
5477
                                         of the <strong>calendar</strong> user specified by the property&quot; ]
5478
                      *[, xparams ]
5479
xparams    = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5480
lang<sup>*</sup>      = as defined in [RFC5646]</p>
5481
<p class="label">Example</p>
5482
<p class="example">&lt;?php
5483
.. .
5484
$dir = &quot;ldap://domain.com:6666/o=3DDC%20Comp,c=3DUS??(cn=3DJohn%20Doe)&quot;;
5485
$vevent-&gt;setProperty( &quot;organizer&quot;
5486
                    , &quot;ical@domain.com&quot;
5487
                    , array( &quot;CN&quot;      =&gt; &quot;John Doe&quot;
5488
                           , &quot;DIR&quot;     =&gt; $dir
5489
                           , &quot;SENT-BY&quot; =&gt; &quot;secretary@domain.com&quot;
5490
                           , &quot;X-Key1&quot;  =&gt; &quot;X-Value1&quot;
5491
                           , &quot;X-Key2&quot;  =&gt; &quot;X-Value2&quot; ));
5492
.. .
5493
</p>
5494
<br>
5495
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5496

    
5497

    
5498
<a name="PERCENT-COMPLETE"></a><h3>3.2.27 PERCENT-COMPLETE</h3>
5499
<p>
5500
This property is used by an assignee or delegatee of a <a href="#VTODO">VTODO</a> to
5501
convey the percent completion of a <a href="#VTODO">VTODO</a> to the Organizer and is
5502
OPTIONAL and MUST NOT occur more than once.
5503
</p>
5504
<p>
5505
The property value is a positive integer between zero and one hundred.
5506
A value of "0" indicates the <a href="#VTODO">VTODO</a> has not yet been started.
5507
A value of "100" indicates that the <a href="#VTODO">VTODO</a> has been completed.
5508
Integer values in between indicate the percent partially complete.
5509
</p>
5510
<h5>Create PERCENT-COMPLETE</h5>
5511
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5512
<p class="label">Format</p>
5513
<p class="format">calendarComponent::createPercentComplete()</p>
5514
<p class="label">Example</p>
5515
<p class="example">&lt;?php
5516
.. .
5517
$str = $component-&gt;createPercentComplete();
5518
.. .
5519
</p>
5520
<h5>Delete PERCENT-COMPLETE</h5>
5521
<p>Remove PERCENT-COMPLETE from component.</p>
5522
<p class="label">Format</p>
5523
<p class="format">calendarComponent::deleteProperty( &quot;PERCENT-COMPLETE&quot; )</p>
5524
<p class="label">Example</p>
5525
<p class="example">&lt;?php
5526
.. .
5527
$vtodo-&gt;deleteProperty( &quot;PERCENT-COMPLETE&quot; )
5528
.. .
5529
</p>
5530
<h5>Get PERCENT-COMPLETE</h5>
5531
<p>If set, returns property value, otherwise FALSE.</p>
5532
<p class="label">Format 1</p>
5533
<p class="format">calendarComponent::getProperty( &quot;PERCENT-COMPLETE&quot; )</p>
5534
<p class="comment">output = percent<sup>1</sup></p>
5535
<p class="label">Format 2</p>
5536
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
5537
<p class="comment">output = array( &quot;value&quot;  =&gt; percent<sup>1</sup>
5538
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
5539
<p class="label">Example</p>
5540
<p class="example">&lt;?php
5541
.. .
5542
$percent = $vtodo-&gt;getProperty( &quot;PERCENT-COMPLETE&quot; );
5543
.. .
5544
</p>
5545
<h5>Set PERCENT-COMPLETE</h5>
5546
<p>Insert property value.</p>
5547
<p class="label">Format</p>
5548
<p class="format">calendarComponent::setProperty( &quot;Percent-Complete&quot;, percent [, xparams ] )</p>
5549
<p class="comment">percent<sup>1</sup> = (int) Value type INTEGER
5550
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5551
</p>
5552
<p class="label">Example</p>
5553
<p class="example">&lt;?php
5554
.. .
5555
$vtodo-&gt;setProperty( &quot;percent-complete&quot;, 90 );
5556
.. .
5557
</p>
5558
<br>
5559
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5560

    
5561

    
5562
<a name="PRIORITY"></a><h3>3.2.28 PRIORITY</h3>
5563
<p>
5564
The property defines the relative priority for a <strong>calendar</strong> component and is OPTIONAL
5565
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
5566
</p>
5567
<p>
5568
The priority is specified as an integer in the range zero to nine.<br>
5569
A value of zero (US-ASCII decimal 48) specifies an undefined priority.<br>
5570
A value of one (US-ASCII decimal 49) is the highest priority.<br>
5571
A value of two (US-ASCII decimal 50) is the second highest priority.<br>
5572
Subsequent numbers specify a decreasing ordinal priority.<br>
5573
A value of nine (US-ASCII decimal 58) is the lowest priority.
5574
</p>
5575
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) PRIORITY values.</p>
5576
<h5>Create PRIORITY</h5>
5577
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5578
<p class="label">Format</p>
5579
<p class="format">calendarComponent::createPriority()</p>
5580
<p class="label">Example</p>
5581
<p class="example">&lt;?php
5582
.. .
5583
$str = $component-&gt;createPriority();
5584
.. .
5585
</p>
5586
<h5>Delete PRIORITY</h5>
5587
<p>Remove PRIORITY from component.</p>
5588
<p class="label">Format</p>
5589
<p class="format">calendarComponent::deleteProperty( &quot;PRIORITY&quot; )</p>
5590
<p class="label">Example</p>
5591
<p class="example">&lt;?php
5592
.. .
5593
$vevent-&gt;deleteProperty( &quot;PRIORITY&quot; );
5594
.. .
5595
</p>
5596
<h5>Get PRIORITY</h5>
5597
<p>If set, returns property value, otherwise FALSE.</p>
5598
<p class="label">Format 1</p>
5599
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot; )</p>
5600
<p class="comment">output = priority<sup>1</sup></p>
5601
<p class="label">Format 2</p>
5602
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
5603
<p class="comment">output = array( &quot;value&quot;  =&gt; priority<sup>1</sup>
5604
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
5605
<p class="label">Example</p>
5606
<p class="example">&lt;?php
5607
.. .
5608
$priority = $vevent-&gt;getProperty( &quot;priority&quot; );
5609
.. .
5610
</p>
5611
<h5>Set PRIORITY</h5>
5612
<p>Insert property value.</p>
5613
<p class="label">Format</p>
5614
<p class="format">calendarComponent::setProperty( &quot;priority&quot;, priority [, xparams ] )</p>
5615
<p class="comment">priority<sup>1</sup> = (int) Value type INTEGER
5616
xparams<sup>2</sup>  = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5617
</p>
5618
<p class="label">Example</p>
5619
<p class="example">&lt;?php
5620
.. .
5621
$vevent-&gt;setProperty( &quot;priority&quot;, 3 );
5622
.. .
5623
</p>
5624
<br>
5625
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5626

    
5627

    
5628
<a name="RDATE"></a><h3>3.2.29 RDATE</h3>
5629
<p>
5630
This property defines the list of date/times for a recurrence set and is OPTIONAL and MAY occur
5631
more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>,
5632
<a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
5633
</p>
5634
<p>
5635
The default value type for RDATE is DATE-TIME, can be set to DATE or PERIOD (params<sup>2</sup>).
5636
In <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components, RDATE MUST be specified as a date-time value type with local time value.
5637
</p>
5638
<h5>Create RDATE</h5>
5639
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5640
<p class="label">Format</p>
5641
<p class="format">calendarComponent::createRdate()</p>
5642
<p class="label">Example</p>
5643
<p class="example">&lt;?php
5644
.. .
5645
$str = $component-&gt;createRdate();
5646
.. .
5647
</p>
5648
<h5>Delete RDATE</h5>
5649
<p>Remove RDATE from component.</p>
5650
<p class="label">Format</p>
5651
<p class="format">calendarComponent::deleteProperty( &quot;RDATE&quot; )</p>
5652
<p class="label">Example 1</p>
5653
<p>Delete (single/first) RDATE property.</p>
5654
<p class="example">&lt;?php
5655
.. .
5656
$vtodo-&gt;deleteProperty( &quot;RDATE&quot; );
5657
.. .
5658
</p>
5659
<p class="label">Example 2</p>
5660
<p>Delete RDATE property no 2.</p>
5661
<p class="example">&lt;?php
5662
.. .
5663
$vjournal-&gt;deleteProperty( &quot;RDATE&quot;, 2 );</p>
5664
<p class="label">Example 3</p>
5665
<p>Delete all RDATE properties.</p>
5666
<p class="example">&lt;?php
5667
.. .
5668
while( $vjournal-&gt;deleteProperty( &quot;RDATE&quot; ))
5669
  continue;
5670
.. .
5671
</p>
5672
<h5>Get RDATE</h5>
5673
<p>If set, returns property value, otherwise FALSE.</p>
5674
<p class="label">Format 1</p>
5675
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot; )</p>
5676
<p class="comment">output = dates<sup>1</sup></p>
5677
<p class="label">Format 2</p>
5678
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot;, propOrderNo/FALSE , TRUE )</p>
5679
<p class="comment">propOrderNo = (int) specific property value</p>
5680
<p class="comment">output = array( &quot;value&quot;  =&gt; dates<sup>1</sup>
5681
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
5682
<p class="label">Format 3</p>
5683
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot;, propOrderNo )</p>
5684
<p class="comment">propOrderNo = (int) specific property value</p>
5685
<p class="comment">Get propOrderNo RDATE</p>
5686
<p class="label">Example</p>
5687
<p class="example">&lt;?php
5688
.. .
5689
$rdates = $vevent-&gt;getProperty( &quot;RDATE&quot; );
5690
.. .
5691
</p>
5692
<h5>Set RDATE</h5>
5693
<p>Insert property value.</p>
5694
<p>The value type for RDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
5695
<p>
5696
If DATE value type is set in params (&quot;VALUE&quot; = &quot;DATE&quot;), all timezone or offset in dates are ignored.<br>
5697
If no &quot;VALUE&quot; value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
5698
</p>
5699
<p>
5700
If &quot;TZID&quot; is set in params,
5701
all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
5702
If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
5703
If no &quot;TZID&quot; is set in params and timezone in 1st date, all remaining dates are within this timezone and param &quot;TZID&quot; is set.<br>
5704
If none of the above rules are applicable, DATE-TIME and local date is set default.
5705
</p>
5706
<p>
5707
Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
5708
</p>
5709
<p>RDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
5710
<p>
5711
In spite of the fact that RDATE may contain a (comma separated) list of values,
5712
a strong recommendation is to split a RDATE &quot;list&quot; into multiple single RDATE entries.
5713
</p>
5714
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
5715
<p class="label">Format</p>
5716
<p class="format">calendarComponent::setProperty( &quot;rdate&quot;, dates [, params [, propOrderNo ]] )</p>
5717
<p class="comment">dates<sup>1</sup>        = (array) ( date2 *[, date2 ] )
5718
date2         = date / (array) ( startdate, enddate/duration )
5719
startdate     = date
5720
enddate       = date
5721
date          = (array) ( (int) year
5722
                        , (int) month
5723
                        , (int) day
5724
                       [, (int) int hour
5725
                        , (int) min
5726
                        , (int) day
5727
                        , tz ] )
5728
date          = (array) ( &quot;year&quot;  =&gt; (int) year
5729
                        , &quot;month&quot; =&gt; (int) month
5730
                        , &quot;day&quot;   =&gt; (int) day
5731
                       [, &quot;hour&quot;  =&gt; (int) hour
5732
                        , &quot;min&quot;   =&gt; (int) min
5733
                        , &quot;sec&quot;   =&gt; (int) sec
5734
                       [, &quot;tz&quot;    =&gt; tz ]] )
5735
                     // <span class="comment">output format</span>
5736
date          = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [, &quot;tz&quot; =&gt; tz ] )
5737
                // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5738
date          = (string) date/datetime string<sup>*</sup>
5739
tz            = &lt;timezone identifier&gt; / offset
5740
                // <span class="comment">timezone will be used as tzidparam, if tzidparam not set</span>
5741
offset        = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5742
duration      = (array) ( (int) week/false
5743
                       [, (int) day/false
5744
                        , (int) hour
5745
                        , (int) min
5746
                        , (int) sec] )
5747
duration      = (array) ([  &quot;week&quot; =&gt; (int) week / FALSE ,] /
5748
                         [  &quot;day&quot;  =&gt; (int) day / FALSE
5749
                         [, &quot;hour&quot; =&gt; (int) hour
5750
                          , &quot;min&quot;  =&gt; (int) min
5751
                          , &quot;sec&quot;  =&gt; (int) sec ]] );
5752
                     // <span class="comment">output format, only used keys</span>
5753
duration      = (array) ( &quot;sec&quot;  =&gt; (int) sec );
5754
duration      = (string) duration like &quot;P15DT5H0M20S&quot;
5755
params<sup>2</sup>       = ([tzidparam ( / datetimeparam / dateparam / periodparam )] *[, xparams ] )
5756
tzidparam     = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
5757
                // <span class="comment">output as local DATE-TIME with timezone identifier</span>
5758
                // <span class="comment">if tzidparam=&quot;GMT&quot;/&quot;UTC&quot; then</span>
5759
                // <span class="comment">output date-time is suffixed by 'Z'</span>
5760
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot;         // <span class="comment">default, output as DATE-TIME</span>
5761
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot;              // <span class="comment">output as DATE</span>
5762
periodparam   = &quot;VALUE&quot; =&gt; &quot;PERIOD&quot;            // <span class="comment">output as PERIOD (datetime)</span>
5763
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5764
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
5765
<br>date/datetime string<sup>*</sup> recommended formats
5766
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
5767
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
5768
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
5769
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
5770
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
5771
    trailing characters (digits), if exists, will be interpreted as offset/timezone
5772
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
5773
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
5774
<p class="label">Example</p>
5775
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).<br>
5776
<p class="example">&lt;?php
5777
.. .
5778
// $rdate1 = array ( 2001, 1, 1, 1, 1, 1 );
5779
// alt.
5780
$rdate1 = array( &quot;year&quot;  =&gt; 2001
5781
               , &quot;month&quot; =&gt; 1
5782
               , &quot;day&quot;   =&gt; 1
5783
               , &quot;hour&quot;  =&gt; 1
5784
               , &quot;min&quot;   =&gt; 1
5785
               , &quot;sec&quot;   =&gt; 1
5786
               , &quot;tz&quot;    =&gt; &quot;GMT&quot; );
5787
$rdate2 = array( 2002, 2, 2, 2, 2, 2, &quot;GMT&quot; );
5788
$rdate3 = &quot;3 March 2003 03.03.03&quot;;
5789
$rdate4 = array( 2004, 4, 4, 4, 4, 4, &quot;GMT&quot; );
5790
$rdate5 = array( 2005, 10, 5, 5, 5, 5 );
5791
$rdate8 = array( &quot;year&quot; =&gt; 2007, &quot;month&quot; =&gt; 7, &quot;day&quot; =&gt; 7 );
5792
$rdur6  = array( &quot;week&quot; =&gt; 0
5793
               , &quot;day&quot;  =&gt; 0
5794
               , &quot;hour&quot; =&gt; 5
5795
               , &quot;min&quot;  =&gt; 5
5796
               , &quot;sec&quot;  =&gt; 5 );
5797
$rdur7  = array( 0, 0, 6 );
5798
  <span class="comment">// duration for 6 hours</span>
5799
$rdur8  = array( &quot;week&quot; =&gt; 8 );
5800
  <span class="comment">// duration for 8 weeks</span>
5801

    
5802
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
5803
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate1 ));
5804
  <span class="comment">// one recurrence date, date in 7-params format (DATE-TIME)</span>
5805

    
5806
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate1, $rdate2 ));
5807
  <span class="comment">// two dates, date 7-params format (DATE-TIME)</span>
5808

    
5809
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate1, $rdate2 )
5810
                                    , array( $rdate3, $rdate4 ))
5811
                             , array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
5812
  <span class="comment">// Both fromdate and enddate must have 7 params (DATE-TIME) !!!</span>
5813

    
5814
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate2, $rdur6 ))
5815
                             , array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
5816
  <span class="comment">// one duration (fromdate-duration)</span>
5817

    
5818
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate1, $date2 )
5819
                                    , array( $rdate3, $rdur7 ))
5820
                             , array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
5821
  <span class="comment">// period, pairs of fromdate+enddate and fromdate-duration</span>
5822

    
5823
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate5, $date8 ))
5824
                             , array( &quot;VALUE&quot; => &quot;DATE&quot; ));
5825
  <span class="comment">// dates in DATE format</span>
5826
.. .
5827
</p>
5828
<br>
5829
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5830

    
5831

    
5832
<a name="RECURRENCE-ID"></a><h3>3.2.30 RECURRENCE-ID</h3>
5833
<p>
5834
This property is used in conjunction with the <a href="#UID">UID</a> and <a href="#SEQUENCE">SEQUENCE</a>
5835
property to identify a specific instance of a recurring <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
5836
or <a href="#VJOURNAL">VJOURNAL</a> <strong>calendar</strong> component and is OPTIONAL and MAY NOT occur more than once.
5837
</p>
5838
<p>
5839
The property value is the effective value of the <a href="#DTSTART">DTSTART</a> property of the recurrence instance.
5840
The default value type is DATE-TIME, can be set to DATE (params<sup>2</sup>).
5841
</p>
5842
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
5843
<p>
5844
The calendar method <a href="#sort2">SORT</a> with argument <a href="#UID">UID</a> also use RECURRENCE-ID / <a href="#SEQUENCE">SEQUENCE</a> as
5845
 sort parameters.
5846
</p>
5847
<br>
5848
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5849

    
5850

    
5851
<a name="RELATED-TO"></a><h3>3.2.31 RELATED-TO</h3>
5852
<p>
5853
The property is used to represent a relationship or reference between one <strong>calendar</strong> component and another
5854
and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
5855
</p>
5856
<p>
5857
The property value consists of the persistent, globally unique identifier of another <strong>calendar</strong> component.
5858
This value would be represented in a <strong>calendar</strong> component by the <a href="#UID">UID</a> property.
5859
</p>
5860
<p>
5861
The value type for RELATED-TO is TEXT.
5862
</p>
5863

    
5864
<h5>Create RELATED-TO</h5>
5865
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5866
<p class="label">Format</p>
5867
<p class="format">calendarComponent::createRelatedTo()</p>
5868
<p class="label">Example</p>
5869
<p class="example">&lt;?php
5870
.. .
5871
$str = $component-&gt;createRelatedTo();
5872
.. .
5873
</p>
5874
<h5>Delete RELATED-TO</h5>
5875
<p>Remove RELATED-TO from component.</p>
5876
<p class="label">Format</p>
5877
<p class="format">calendarComponent::deleteProperty( &quot;RELATED-TO&quot; )</p>
5878
<p class="label">Example 1</p>
5879
<p>Delete /single/first) RELATED-TO property</p>
5880
<p class="example">&lt;?php
5881
.. .
5882
$vtodo-&gt;deleteProperty( &quot;RELATED-TO&quot; )</p>
5883
<p class="label">Example 2</p>
5884
<p>Delete RELATED-TO property no 2.</p>
5885
<p class="example">&lt;?php
5886
.. .
5887
$vjournal-&gt;deleteProperty( &quot;RELATED-TO&quot;, 2 );
5888
.. .
5889
</p>
5890
<p class="label">Example 3</p>
5891
<p>Deleting all RELATED-TO properties.</p>
5892
<p class="example">&lt;?php
5893
.. .
5894
while( $vjournal-&gt;deleteProperty( &quot;RELATED-TO&quot; ))
5895
  continue;
5896
.. .
5897
</p>
5898
<h5>Get RELATED-TO</h5>
5899
<p>If set, returns property value, otherwise FALSE.</p>
5900
<p class="label">Format 1</p>
5901
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot; )</p>
5902
<p class="comment">output = relid<sup>1</sup></p>
5903
<p class="label">Format 2</p>
5904
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot;, propOrderNo/FALSE , TRUE )</p>
5905
<p class="comment">propOrderNo = (int) specific property value</p>
5906
<p class="comment">output = array( &quot;value&quot;  =&gt; relid<sup>1</sup>
5907
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
5908
<p class="label">Format 3</p>
5909
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot;, propOrderNo )</p>
5910
<p class="comment">propOrderNo = (int) specific property value</p>
5911
<p class="comment">Get propOrderNo RELATED-TO</p>
5912
<p class="label">Example</p>
5913
<p class="example">&lt;?php
5914
.. .
5915
$relatedId = $vtodo-&gt;getProperty( &quot;RELATED-TO&quot; );
5916
.. .
5917
</p>
5918
<h5>Set RELATED-TO</h5>
5919
<p>Insert property value.</p>
5920
<p class="label">Format</p>
5921
<p class="format">calendarComponent::setProperty( &quot;Related-To&quot;, relid [, params [, propOrderNo ]] )</p>
5922
<p class="comment">relid<sup>1</sup>      = (string) Value type TEXT.
5923
params<sup>2</sup>     = (array) ( [ reltype ] *[, xparams] )
5924
reltype     = &quot;RELTYPE&quot; =&gt; (&quot;PARENT&quot; (Default)
5925
                          / &quot;CHILD&quot;
5926
                          / &quot;SIBLING&quot;
5927
                          / (string) iana-token
5928
                          / (string) x-name )
5929
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5930
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
5931
</p>
5932
<p class="label">Example</p>
5933
<p class="example">&lt;?php
5934
.. .
5935
$vtodo-&gt;setProperty( &quot;related-to&quot;, &quot;19960401-080045-4000F192713@host.com&quot;);
5936
.. .
5937
</p>
5938
<br>
5939
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5940

    
5941
<a name="REPEAT"></a><h3>3.2.32 REPEAT</h3>
5942
<p>
5943
This property defines the number of time the <a href="#VALARM">ALARM</a> should be repeated, after the initial trigger.
5944
If the <a href="#VALARM">ALARM</a> triggers more than once, then this property MUST be specified along with the <a href="#DURATION">DURATION</a> property.
5945
</p>
5946
<p>The value type for REPEAT is INTEGER.</p>
5947
<h5>Create REPEAT</h5>
5948
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5949
<p class="label">Format</p>
5950
<p class="format">calendarComponent::createRepeat()</p>
5951
<p class="label">Example</p>
5952
<p class="example">&lt;?php
5953
.. .
5954
$str = $component-&gt;createRepeat();
5955
.. .
5956
</p>
5957
<h5>Delete REPEAT</h5>
5958
<p>Remove REPEAT from component.</p>
5959
<p class="label">Format</p>
5960
<p class="format">calendarComponent::deleteProperty( &quot;REPEAT&quot; )</p>
5961
<p class="label">Example</p>
5962
<p class="example">&lt;?php
5963
.. .
5964
$valarm-&gt;deleteProperty( &quot;REPEAT&quot; );
5965
.. .
5966
</p>
5967
<h5>Get REPEAT</h5>
5968
<p>If set, returns property value, otherwise FALSE.</p>
5969
<p class="label">Format 1</p>
5970
<p class="format">calendarComponent::getProperty( &quot;REPEAT&quot; )</p>
5971
<p class="comment">output = repeatTimes<sup>1</sup></p>
5972
<p class="label">Format 2</p>
5973
<p class="format">calendarComponent::getProperty( &quot;REPEAT&quot;, FALSE , TRUE )</p>
5974
<p class="comment">output = array( &quot;value&quot;  =&gt; repeatTimes<sup>1</sup>
5975
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
5976
<p class="label">Example</p>
5977
<p class="example">&lt;?php
5978
.. .
5979
$repeat = $vtodo-&gt;getProperty( &quot;REPEAT&quot; );
5980
.. .
5981
</p>
5982
<h5>Set REPEAT</h5>
5983
<p>Insert property value.</p>
5984
<p class="label">Format</p>
5985
<p class="format">calendarComponent::setProperty( &quot;repeat&quot;, repeatTimes [, xparams ] )</p>
5986
<p class="comment">repeatTimes<sup>1</sup> = (int) Value type INTEGER
5987
xparams<sup>2</sup>     = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5988
</p>
5989
<p class="label">Example</p>
5990
<p class="example">&lt;?php
5991
.. .
5992
$valarm-&gt;setProperty( &quot;repeat&quot;, 2 );
5993
.. .
5994
</p>
5995
<br>
5996
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5997

    
5998

    
5999
<a name="REQUEST-STATUS"></a><h3>3.2.33 REQUEST-STATUS</h3>
6000
<p>
6001
This property defines the status code returned for a scheduling request and is OPTIONAL and
6002
MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
6003
</p>
6004
<p>The value type for REQUEST-STATUS is TEXT and consists of</p>
6005
<dl>
6006
<dt>a short return status component,
6007
<dd>(in output) a PERIOD character separated 3-tuple of integers, ex 3.11
6008
<dt>a longer return status description component
6009
<dt>optionally a statusspecific data component
6010
</dl>
6011
<h5>Create REQUEST-STATUS</h5>
6012
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6013
<p class="label">Format</p>
6014
<p class="format">calendarComponent::createRequestStatus()</p>
6015
<p class="label">Example</p>
6016
<p class="example">&lt;?php
6017
.. .
6018
$str = $component-&gt;createRequestStatus();
6019
.. .
6020
</p>
6021
<h5>Delete REQUEST-STATUS</h5>
6022
<p>Remove REQUEST-STATUS from component.</p>
6023
<p class="label">Format</p>
6024
<p class="format">calendarComponent::deleteProperty( &quot;REQUEST-STATUS&quot; )</p>
6025
<p class="label">Example 1</p>
6026
<p>Delete (single/first) REQUEST-STATUS property.</p>
6027
<p class="example">&lt;?php
6028
.. .
6029
$vtodo-&gt;deleteProperty( &quot;REQUEST-STATUS&quot; );
6030
.. .
6031
</p>
6032
<p class="label">Example 2</p>
6033
<p>Delete REQUEST-STATUS property no 2.</p>
6034
<p class="example">&lt;?php
6035
.. .
6036
$vjournal-&gt;deleteProperty( &quot;REQUEST-STATUS&quot;, 2 );
6037
.. .
6038
</p>
6039
<p class="label">Example 3</p>
6040
<p>Deleting all REQUEST-STATUS properties.</p>
6041
<p class="example">&lt;?php
6042
.. .
6043
while( $vjournal-&gt;deleteProperty( &quot;REQUEST-STATUS&quot; ))
6044
  continue;
6045
.. .
6046
</p>
6047
<h5>Get REQUEST-STATUS</h5>
6048
<p>If set, returns property value, otherwise FALSE.</p>
6049
<p class="label">Format 1</p>
6050
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot; )</p>
6051
<p class="comment">output = array( &quot;statcode&quot; =&gt; statcode<sup>1</sup>
6052
              , &quot;text&quot;     =&gt; errtext<sup>2</sup>
6053
            [ , &quot;extdata&quot;  =&gt; extraData<sup>3</sup> ] )</p>
6054
<p class="label">Format 2</p>
6055
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot;, propOrderNo/FALSE, TRUE )</p>
6056
<p class="comment">propOrderNo = (int) specific property value</p>
6057
<p class="comment">output = array( &quot;value&quot; =&gt; array( &quot;statcode&quot; =&gt; statcode<sup>1</sup>
6058
                                , &quot;text&quot;     =&gt; errtext<sup>2</sup>
6059
                              [ , &quot;extdata&quot;  =&gt; extraData<sup>3</sup> ] )
6060
              , &quot;params&quot; =&gt; params<sup>4</sup> )</p>
6061
<p class="label">Format 3</p>
6062
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot;, propOrderNo )</p>
6063
<p class="comment">propOrderNo = (int) specific property value</p>
6064
<p class="comment">Get propOrderNo REQUEST-STATUS</p>
6065
<p class="label">Example</p>
6066
<p class="example">&lt;?php
6067
.. .
6068
$requestStatus = $vtodo-&gt;getProperty( &quot;REQUEST-STATUS&quot; );
6069
.. .
6070
</p>
6071
<h5>Set REQUEST-STATUS</h5>
6072
<p>Insert property value.</p>
6073
<p class="label">Format</p>
6074
<p class="format">calendarComponent::setProperty( &quot;Request-Status&quot;
6075
           , statcode, errtext [,extraData/FALSE [,params [,propOrderNo]]])</p>
6076
<p class="comment">statcode<sup>1</sup>   = (int) Hierarchical, numeric return status code
6077
                          (1*DIGIT &quot;.&quot; 1*DIGIT 1*DIGIT)
6078
errtext<sup>2</sup>    = (string) Textual status description
6079
extraData<sup>3</sup>  = (string) Textual exception data.
6080
             For example, the offending property name and value
6081
             or complete property line.
6082
params<sup>4</sup>     = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams ] )
6083
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6084
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
6085
lang<sup>*</sup>       = as defined in [RFC5646]</p>
6086
<p class="label">Example</p>
6087
<p class="example">&lt;?php
6088
.. .
6089
$vfreebusy-&gt;setProperty(&quot;request-status&quot;
6090
                       , 2.00
6091
                       , &quot;Invalid property value&quot;
6092
                       , &quot;DTSTART:96-Apr-31&quot;);
6093
.. .
6094
</p>
6095
<br>
6096
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6097

    
6098

    
6099
<a name="RESOURCES"></a><h3>3.2.34 RESOURCES</h3>
6100
<p>
6101
This property defines the equipment or resources anticipated for an activity specified by a <strong>calendar</strong> entity
6102
and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
6103
</p>
6104
<p>The value type for RESOURCES is TEXT.</p>
6105
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) RESOURCES values.</p>
6106
<h5>Create RESOURCES</h5>
6107
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6108
<p class="label">Format</p>
6109
<p class="format">calendarComponent::createResources()</p>
6110
<p class="label">Example</p>
6111
<p class="example">&lt;?php
6112
.. .
6113
$str = $component-&gt;createResources();
6114
.. .
6115
</p>
6116
<h5>Delete RESOURCES</h5>
6117
<p>Remove RESOURCES from component.</p>
6118
<p class="label">Format</p>
6119
<p class="format">calendarComponent::deleteProperty( &quot;RESOURCES&quot; )</p>
6120
<p class="label">Example 1</p>
6121
<p>Delete (single/first) RESOURCES property.</p>
6122
<p class="example">&lt;?php
6123
.. .
6124
$vevent-&gt;deleteProperty( &quot;RESOURCES&quot; );
6125
.. .
6126
</p>
6127
<p class="label">Example 2</p>
6128
<p>Delete RESOURCES property no 2.</p>
6129
<p class="example">&lt;?php
6130
.. .
6131
$vevent-&gt;deleteProperty( &quot;RESOURCES&quot;, 2 );
6132
.. .
6133
</p>
6134
<p class="label">Example 3</p>
6135
<p>Delete all RESOURCES properties.<p>
6136
<p class="example">&lt;?php
6137
.. .
6138
while( $vevent-&gt;deleteProperty( &quot;RESOURCES&quot; ))
6139
  continue;
6140
.. .
6141
</p>
6142
<h5>Get RESOURCES</h5>
6143
<p>If set, returns property value, otherwise FALSE.</p>
6144
<p class="label">Format 1</p>
6145
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot; )</p>
6146
<p class="comment">output = resources<sup>1</sup></p>
6147
<p class="label">Format 2</p>
6148
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot;, propOrderNo/FALSE, TRUE )</p>
6149
<p class="comment">propOrderNo = (int) specific property value</p>
6150
<p class="comment">output = array( &quot;value&quot;  =&gt; resources<sup>1</sup>
6151
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
6152
<p class="label">Format 3</p>
6153
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot;, propOrderNo )</p>
6154
<p class="comment">propOrderNo = (int) specific property value</p>
6155
<p class="comment">Get propOrderNo RESOURCES</p>
6156
<p class="label">Example</p>
6157
<p class="example">&lt;?php
6158
.. .
6159
$resources = $vtodo-&gt;getProperty( &quot;RESOURCES&quot; );
6160
.. .
6161
</p>
6162
<h5>Set RESOURCES</h5>
6163
<p>Insert property value.</p>
6164
<p>
6165
In spite of the fact that RESOURCES may contain a (comma separated) list of values,
6166
a strong recommendation is to split a RESOURCES &quot;list&quot; into multiple single RESOURCES entries.
6167
</p>
6168
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
6169
<p class="label">Format</p>
6170
<p class="format">calendarComponent::setProperty( &quot;resources&quot;, resources [, params [, propOrderNo ]] )</p>
6171
<p class="comment">resources<sup>1</sup>  = (string) resource / (array) ( *resource )
6172
resource    = (string) textual resources or subtypes of the <strong>calendar</strong> component,
6173
                       can be specified as a list of resources
6174
                       separated by the COMMA character.
6175
params<sup>2</sup>     = (array) (
6176
                   [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
6177
                   [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
6178
                  *[, xparams] )
6179
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6180
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
6181
lang<sup>*</sup>       = as defined in [RFC5646]</p>
6182
<p class="label">Example</p>
6183
<p class="example">&lt;?php
6184
.. .
6185
$vevent-&gt;setProperty( &quot;resources&quot;, &quot;COMPUTER PROJECTOR&quot; );
6186
.. .
6187
</p>
6188
<br>
6189
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6190

    
6191

    
6192
<a name="RRULE"></a><h3>3.2.35 RRULE</h3>
6193
<p>
6194
This property defines a rule or repeating pattern for recurring <a href="#VEVENT">EVENTs</a>, <a href="#VTODO">TODOs</a>,
6195
<a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> definitions and is OPTIONAL and MAY occur more than once ([RFC2445]),
6196
SHOULD NOT occur more than once ([RFC5545]).
6197
</p>
6198
<h5>Create RRULE</h5>
6199
<p>If set, returns iCal formatted string, otherwise FALSE.</p>
6200
<p class="label">Format</p>
6201
<p class="format">calendarComponent::createRrule()</p>
6202
<p class="label">Example</p>
6203
<p class="example">&lt;?php
6204
.. .
6205
$str = $component-&gt;createRrule();
6206
.. .
6207
</p>
6208
<h5>Delete RRULE</h5>
6209
<p>Remove RRULE from component.</p>
6210
<p class="label">Format</p>
6211
<p class="format">calendarComponent::deleteProperty( &quot;RRULE&quot; )</p>
6212
<p class="label">Example 1</p>
6213
<p>Delete (single/first) RRULE property.</p>
6214
<p class="example">&lt;?php
6215
.. .
6216
$vevent-&gt;deleteProperty( &quot;RRULE&quot; );
6217
.. .
6218
</p>
6219
<p class="label">Example 2</p>
6220
<p>Delete RRULE property no 2.</p>
6221
<p class="example">&lt;?php
6222
.. .
6223
$vevent-&gt;deleteProperty( &quot;RRULE&quot;, 2 );
6224
.. .
6225
</p>
6226
<p class="label">Example 3</p>
6227
<p>Delete all RRULE properties.</p>
6228
<p class="example">&lt;?php
6229
.. .
6230
while( $vevent-&gt;deleteProperty( &quot;RRULE&quot; ))
6231
  continue;
6232
.. .
6233
</p>
6234
<h5>Get RRULE</h5>
6235
<p>If set, returns property value, otherwise FALSE.</p>
6236
<p class="label">Format 1</p>
6237
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot; )</p>
6238
<p class="comment">output = recur<sup>1</sup></p>
6239
<p class="label">Format 2</p>
6240
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot;, propOrderNo/FALSE, TRUE )</p>
6241
<p class="comment">propOrderNo = (int) specific property value</p>
6242
<p class="comment">output = array( &quot;value&quot;  =&gt; recur<sup>1</sup>
6243
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6244
<p class="label">Format 3</p>
6245
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot;, propOrderNo )</p>
6246
<p class="comment">propOrderNo = (int) specific property value</p>
6247
<p class="comment">Get propOrderNo RRULE</p>
6248
<p class="label">Example</p>
6249
<p class="example">&lt;?php
6250
.. .
6251
$rrules = $vtodo-&gt;getProperty( &quot;RRULE&quot; );
6252
.. .
6253
</p>
6254
<h5>Set RRULE</h5>
6255
<p>Insert property value.</p>
6256
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
6257
<p class="label">Format</p>
6258
<p class="format">calendarComponent::setProperty( &quot;rrule&quot;, recur [, xparams [, propOrderNo ]] )</p>
6259
<p>
6260
For rules example see <a href="#EXRULE">Exrule</a> format and in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
6261
</p>
6262
<p class="comment">recur<sup>1</sup>      = see <a href="#EXRULE">Exrule</a>
6263
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6264
propOrderNo = (int) order number                              // <span class="comment">1=1st, 2=2nd etc</span>
6265
</p>
6266
<br>
6267
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6268

    
6269
<a name="SEQUENCE"></a><h3>3.2.36 SEQUENCE</h3>
6270
<p>
6271
This property defines the revision sequence number of the <strong>calendar</strong> component within a sequence of revisions.
6272
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
6273
<a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
6274
</p>
6275
<p class="quotes">
6276
It is monotonically incremented by the <a href="#ORGANIZER">ORGANIZER's</a> CUA (Calendar
6277
User Agent) each time the <a href="#ORGANIZER">ORGANIZER</a> makes a significant revision
6278
to the <strong>calendar</strong> component.
6279
<br><br>
6280
When the <a href="#ORGANIZER">ORGANIZER</a> makes changes to one of the following
6281
properties, the sequence number MUST be incremented: <a href="#DTSTART">DTSTART</a>,
6282
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a>, <a href="#RDATE">RDATE</a>, <a href="#RRULE">RRULE</a>,
6283
<a href="#EXDATE">EXDATE</a>, <a href="#EXRULE">EXRULE</a>, <a href="#STATUS">STATUS</a>. In addition,
6284
changes made by the <a href="#ORGANIZER">ORGANIZER</a> to other properties can also force
6285
the sequence number to be incremented. The <a href="#ORGANIZER">ORGANIZER</a> CUA MUST
6286
increment the sequence number when ever it makes changes to
6287
properties in the <strong>calendar</strong> component that the <a href="#ORGANIZER">ORGANIZER</a>
6288
deems will jeopardize the validity of the participation status of the
6289
<a href="#ATTENDEE">Attendees</a>. For example, changing the location
6290
of a meeting from one locale to another distant locale could
6291
effectively impact the participation status of the <a href="#ATTENDEE">Attendees</a>.
6292
</p>
6293
<p>The value type of SEQUENCE is INTEGER.</p>
6294
<p>The calendar method <a href="#sort2">SORT</a> with argument <a href="#UID">UID</a> also use <a href="#RECURRENCE-ID">RECURRENCE-ID</a> / SEQUENCE as
6295
sort parameters.</p>
6296
<h5>Create SEQUENCE</h5>
6297
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6298
<p class="label">Format</p>
6299
<p class="format">calendarComponent::createSequence()</p>
6300
<p class="label">Example</p>
6301
<p class="example">&lt;?php
6302
.. .
6303
$str = $component-&gt;createSequence();
6304
.. .
6305
</p>
6306
<h5>Delete SEQUENCE</h5>
6307
<p>Remove SEQUENCE from component.</p>
6308
<p class="label">Format</p>
6309
<p class="format">calendarComponent::deleteProperty( &quot;SEQUENCE&quot; )</p>
6310
<p class="label">Example</p>
6311
<p class="example">&lt;?php
6312
.. .
6313
$vtodo-&gt;deleteProperty( &quot;SEQUENCE&quot; );
6314
.. .
6315
</p>
6316
<h5>Get SEQUENCE</h5>
6317
<p>If set, returns property value, otherwise FALSE.</p>
6318
<p class="label">Format 1</p>
6319
<p class="format">calendarComponent::getProperty( &quot;SEQUENCE&quot; )</p>
6320
<p class="comment">output = sequence<sup>1</sup></p>
6321
<p class="label">Format 2</p>
6322
<p class="format">calendarComponent::getProperty( &quot;SEQUENCE&quot;, FALSE , TRUE )</p>
6323
<p class="comment">output = array( &quot;value&quot;  =&gt; sequence<sup>1</sup>
6324
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6325
<p class="label">Example</p>
6326
<p class="example">&lt;?php
6327
.. .
6328
$sequence = $vtodo-&gt;getProperty( &quot;SEQUENCE&quot; );
6329
.. .
6330
</p>
6331
<h5>Set SEQUENCE</h5>
6332
<p>Insert property value.</p>
6333
<p class="label">Format</p>
6334
<p class="format">calendarComponent::setProperty( &quot;sequence&quot; [, sequence [, xparams ]] )</p>
6335
<p class="comment">sequence<sup>1</sup> = (int) Value type INTEGER
6336
xparams<sup>2</sup>  = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6337
</p>
6338
<p class="label">Example 1</p>
6339
<p class="example">&lt;?php
6340
.. .
6341
$vevent-&gt;setProperty( &quot;sequence&quot;, 2 ); <span class="comment">// set sequence number to 2</span>
6342
.. .
6343
</p>
6344
<p class="label">Example 2</p>
6345
<p class="example">&lt;?php
6346
.. .
6347
$vevent-&gt;setProperty( &quot;sequence&quot; ); <span class="comment">// force sequence number to be set to 0
6348
                                                                        // or, if sequence exists, incremented by 1</span>
6349
.. .
6350
</p>
6351
<br>
6352
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6353

    
6354

    
6355
<a name="STATUS"></a><h3>3.2.37 STATUS</h3>
6356
<p>
6357
This property defines the overall status or confirmation for the <strong>calendar</strong> component.
6358
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
6359
and <a href="#VJOURNAL">VJOURNAL</a> components.
6360
</p>
6361
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) STATUS values.</p>
6362
<h5>Create STATUS</h5>
6363
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6364
<p class="label">Format</p>
6365
<p class="format">calendarComponent::createStatus()</p>
6366
<p class="label">Example</p>
6367
<p class="example">&lt;?php
6368
.. .
6369
$str = $component-&gt;createStatus();
6370
.. .
6371
</p>
6372
<h5>Delete STATUS</h5>
6373
<p>Remove STATUS from component.</p>
6374
<p class="label">Format</p>
6375
<p class="format">calendarComponent::deleteProperty( &quot;STATUS&quot; )</p>
6376
<p class="label">Example</p>
6377
<p class="example">&lt;?php
6378
.. .
6379
$vtodo-&gt;deleteProperty( &quot;STATUS&quot; );
6380
.. .
6381
</p>
6382
<h5>Get STATUS</h5>
6383
<p>If set, returns property value, otherwise FALSE.</p>
6384
<p class="label">Format 1</p>
6385
<p class="format">calendarComponent::getProperty( &quot;STATUS&quot; )</p>
6386
<p class="comment">output = status<sup>1</sup></p>
6387
<p class="label">Format 2</p>
6388
<p class="format">calendarComponent::getProperty( &quot;STATUS&quot;, FALSE , TRUE )</p>
6389
<p class="comment">output = array( &quot;value&quot;  =&gt; status<sup>1</sup>
6390
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6391
<p class="label">Example</p>
6392
<p class="example">&lt;?php
6393
.. .
6394
$status = $vtodo-&gt;getProperty( &quot;STATUS&quot; );
6395
.. .
6396
</p>
6397
<h5>Set STATUS</h5>
6398
<p>Insert property value.</p>
6399
<p class="label">Format</p>
6400
<p class="format">calendarComponent::setProperty( &quot;status&quot;, status [, xparams ] )</p>
6401
<p class="comment">                          // <span class="comment">Status values for a <a href="#vevent">VEVENT</a></span>
6402
status<sup>1</sup>  = &quot;TENTATIVE&quot;    // <span class="comment">Indicates event is tentative</span>
6403
         / &quot;CONFIRMED&quot;    // <span class="comment">Indicates event is definite</span>
6404
         / &quot;CANCELLED&quot;    // <span class="comment">Indicates event was cancelled</span>
6405
                          // <span class="comment">Status values for <a href="#VTODO">VTODO</a></span>
6406
status<sup>1</sup>  = &quot;NEEDS-ACTION&quot; // <span class="comment">Indicates to-do needs action</span>
6407
         / &quot;COMPLETED&quot;    // <span class="comment">Indicates to-do completed</span>
6408
         / &quot;IN-PROCESS&quot;   // <span class="comment">Indicates to-do in process of</span>
6409
         / &quot;CANCELLED&quot;    // <span class="comment">Indicates to-do was cancelled</span>
6410
                          // <span class="commsnt">Status values for <a href="#VJOURNAL">VJOURNAL</a></span>
6411
status<sup>1</sup>  = &quot;DRAFT&quot;        // <span class="comment">Indicates journal is draft</span>
6412
         / &quot;FINAL&quot;        // <span class="comment">Indicates journal is final</span>
6413
         / &quot;CANCELLED&quot;    // <span class="comment">Indicates journal is removed</span>
6414
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6415
</p>
6416
<p class="label">Example</p>
6417
<p class="example">&lt;?php
6418
.. .
6419
$vevent-&gt;setProperty( &quot;Status&quot;, &quot;COMPLETED&quot; );
6420
.. .
6421
</p>
6422
<br>
6423
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6424

    
6425

    
6426
<a name="SUMMARY"></a><h3>3.2.38 SUMMARY</h3>
6427
<p>
6428
This property defines a short (&quot;one line&quot;) summary or subject for the <strong>calendar</strong> component.
6429
(In &quot;[RFC5545], Recommended Practices&quot;, up to 255 characters) (, analogous to a mail SUBJECT).
6430
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
6431
and <a href="#VJOURNAL">VJOURNAL</a> components. The property is REQUIRED and MUST occur once in
6432
<a href="#VALARM">VALARM</a> (EMAIL) <strong>calendar</strong> component.
6433
</p>
6434
<p>The value type for SUMMARY is TEXT.</p>
6435
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) SUMMARY values.</p>
6436
<h5>Create SUMMARY</h5>
6437
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6438
<p class="label">Format</p>
6439
<p class="format">calendarComponent::createSummary()</p>
6440
<p class="label">Example</p>
6441
<p class="example">&lt;?php
6442
.. .
6443
$str = $component-&gt;createSummary();
6444
.. .
6445
</p>
6446
<h5>Delete SUMMARY</h5>
6447
<p>Remove SUMMARY from component.</p>
6448
<p class="label">Format</p>
6449
<p class="format">calendarComponent::deleteProperty( &quot;SUMMARY&quot; )</p>
6450
<p class="label">Example</p>
6451
<p class="example">&lt;?php
6452
.. .
6453
$vevent-&gt;deleteProperty( &quot;SUMMARY&quot; );
6454
.. .
6455
</p>
6456
<h5>Get SUMMARY</h5>
6457
<p>If set, returns property value, otherwise FALSE.</p>
6458
<p class="label">Format 1</p>
6459
<p class="format">calendarComponent::getProperty( &quot;SUMMARY&quot; )</p>
6460
<p class="comment">output = summary<sup>1</sup></p>
6461
<p class="label">Format 2</p>
6462
<p class="format">calendarComponent::getProperty( &quot;SUMMARY&quot;, FALSE , TRUE )</p>
6463
<p class="comment">output = array( &quot;value&quot;  =&gt; summary<sup>1</sup>
6464
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
6465
<p class="label">Example</p>
6466
<p class="example">&lt;?php
6467
.. .
6468
$summary = $vtodo-&gt;getProperty( &quot;SUMMARY&quot; );
6469
.. .
6470
</p>
6471
<h5>Set SUMMARY</h5>
6472
<p>Insert property value.</p>
6473
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
6474
<p class="label">Format</p>
6475
<p class="format">calendarComponent::setProperty( &quot;summary&quot;, summary [, params ] )</p>
6476
<p CLASS="comment">summary<sup>1</sup> = (string) Value type TEXT,
6477
           a short, one line summary about the activity or journal entry.
6478
params<sup>2</sup>  = array( [&quot;ALTREP&quot;   =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
6479
                [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
6480
               *[, xparams ] )
6481
xparams  = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6482
lang<sup>*</sup>    = as defined in [RFC5646]</p>
6483
<p class="label">Example</p>
6484
<p class="example">&lt;?php
6485
.. .
6486
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;This is a summary&quot; );
6487
.. .
6488
</p>
6489
<br>
6490
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6491

    
6492

    
6493
<a name="TRANSP"></a><h3>3.2.39 TRANSP</h3>
6494
<p>
6495
This property defines whether an <a href="#VEVENT">EVENT</a> is transparent or not to busy time searches and is OPTIONAL and MUST NOT occur more than once.
6496
</p>
6497
<h5>Create TRANSP</h5>
6498
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6499
<p class="label">Format</p>
6500
<p class="format">calendarComponent::createTransp()</p>
6501
<p class="label">Example</p>
6502
<p class="example">&lt;?php
6503
.. .
6504
$str = $component-&gt;createTransp();
6505
.. .
6506
</p>
6507
<h5>Delete TRANSP</h5>
6508
<p>Remove TRANSP from component.</p>
6509
<p class="label">Format</p>
6510
<p class="format">calendarComponent::deleteProperty( &quot;TRANSP&quot; )</p>
6511
<p class="label">Example</p>
6512
<p class="example">&lt;?php
6513
.. .
6514
$vevent-&gt;deleteProperty( &quot;TRANSP&quot; );
6515
.. .
6516
</p>
6517
<h5>Get TRANSP</h5>
6518
<p>If set, returns property value, otherwise FALSE.</p>
6519
<p class="label">Format 1</p>
6520
<p class="format">calendarComponent::getProperty( &quot;TRANSP&quot; )</p>
6521
<p class="comment">output = transp<sup>1</sup></p>
6522
<p class="label">Format 2</p>
6523
<p class="format">calendarComponent::getProperty( &quot;TRANSP&quot;, FALSE , TRUE )</p>
6524
<p class="comment">output = array( &quot;value&quot;  =&gt; transp<sup>1</sup>
6525
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6526
<p class="label">Example</p>
6527
<p class="example">&lt;?php
6528
.. .
6529
$transp = $vtodo-&gt;getProperty( &quot;TRANSP&quot; );
6530
.. .
6531
</p>
6532
<h5>Set TRANSP</h5>
6533
<p>Insert property value.</p>
6534
<p class="label">Format</p>
6535
<p class="format">calendarComponent::setProperty( &quot;transp&quot;, transp [, xparams ] )</p>
6536
<p class="comment">transp<sup>1</sup>  = &quot;OPAQUE&quot; / &quot;TRANSPARENT&quot;
6537
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6538
</p>
6539
<p class="label">Example</p>
6540
<p class="example">&lt;?php
6541
.. .
6542
$vevent-&gt;setProperty( &quot;transp&quot;, &quot;TRANSPARENT&quot; );
6543
.. .
6544
</p>
6545
<br>
6546
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6547

    
6548

    
6549
<a name="TRIGGER"></a><h3>3.2.40 TRIGGER</h3>
6550
<p>
6551
This property specifies when an <a href="#VALARM">ALARM</a> will trigger and is REQUIRED and MUST NOT occur more than once.
6552
</p>
6553
<p>
6554
The default value type is DURATION. The value type can be set to a DATE-TIME value type,
6555
in which case the value MUST specify an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value.
6556
</p>
6557
<h5>Create TRIGGER</h5>
6558
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6559
<p class="label">Format</p>
6560
<p class="format">valarm::createTrigger()</p>
6561
<p class="label">Example</p>
6562
<p class="example">&lt;?php
6563
.. .
6564
$str = $component-&gt;createTrigger();
6565
.. .
6566
</p>
6567
<h5>Delete TRIGGER</h5>
6568
<p>Remove TRIGGER from component.</p>
6569
<p class="label">Format</p>
6570
<p class="format">valarm::deleteProperty( &quot;TRIGGER&quot; )</p>
6571
<p class="label">Example</p>
6572
<p class="example">&lt;?php
6573
.. .
6574
$valarm-&gt;deleteProperty( &quot;TRIGGER&quot; );
6575
.. .
6576
</p>
6577
<h5>Get TRIGGER</h5>
6578
<p>If set, returns property value, otherwise FALSE.</p>
6579
<p class="label">Format 1</p>
6580
<p class="format">valarm::getProperty( &quot;TRIGGER&quot; )</p>
6581
<p class="comment">output = duration/date</p>
6582
<p class="label">Format 2</p>
6583
<p class="format">valarm::getProperty( &quot;TRIGGER&quot;, FALSE , TRUE )</p>
6584
<p class="comment">output   = array( &quot;value&quot;        =&gt; duration<sup>1</sup>/date<sup>3</sup> )
6585
                , &quot;params&quot;       =&gt; params<sup>4</sup> )
6586
<p class="label">Example</p>
6587
<p class="example">&lt;?php
6588
.. .
6589
$trigger = $vtodo-&gt;getProperty( &quot;TRIGGER&quot; );
6590
.. .
6591
</p>
6592
<h5>Set TRIGGER</h5>
6593
<p>Insert property value.</p>
6594
<p>Note, use function <a href="#transformDateTime">transformDateTime</a> to change a (local) datetime to UTC time zone.</p>
6595
<p class="label">Format 1</p>
6596
<p class="format">valarm::setProperty( &quot;trigger&quot;, duration<sup>1</sup> [, params<sup>4</sup> ] )</p>
6597
<p class="label">Format 2</p>
6598
<p class="format">valarm::setProperty( &quot;trigger&quot;, duration<sup>2</sup> [, params<sup>4</sup> ] )</p>
6599
<p class="label">Format 3</p>
6600
<p class="format">valqarm::setProperty( &quot;trigger&quot;, date<sup>3</sup> [, params<sup>4</sup> ] )</p>
6601
<p class="label">Format</p>
6602
<p class="format">valarm::setProperty( &quot;trigger&quot;, (int) year / FALSE
6603
                      , (int) month / FALSE
6604
                      , (int) day / FALSE
6605
                     [, (int) week / FALSE
6606
                     [, (int) hour / FALSE
6607
                      , (int) min / FALSE
6608
                      , (int) sec / FALSE
6609
                     [, relatedStart
6610
                     [, before
6611
                     [, params<sup>4</sup> ]]]]] )</p>
6612
<p class="comment">duration<sup>1</sup> = (array) ( &quot;week&quot;     =&gt; (int) week
6613
                , &quot;relatedStart&quot; =&gt; relatedStart
6614
                , &quot;before&quot;       =&gt; before )
6615
duration<sup>1</sup> = (array) ( &quot;day&quot;  =&gt; (int) day
6616
                , &quot;hour&quot; =&gt; (int) hour
6617
                , &quot;min&quot;  =&gt; (int) min
6618
                , &quot;sec&quot;  =&gt; (int) sec
6619
                , &quot;relatedStart&quot; =&gt; relatedStart
6620
                , &quot;before&quot;       =&gt; before )
6621
relatedStart = (bool) TRUE  : related start (default),
6622
                      FALSE : related end
6623
before       = (booL) TRUE  : before relatedStart (default),
6624
                      FALSE : after relatedStart
6625
duration<sup>2</sup> = (string) dur-value = ([&quot;+&quot;]/&quot;-&quot;)&quot;P&quot;(dur-date/dur-time/dur-week)
6626
dur-date     = dur-day [dur-time]
6627
dur-time     = &quot;T&quot; (dur-hour / dur-minute / dur-second)
6628
dur-week     = 1*DIGIT &quot;W&quot;
6629
dur-day      = 1*DIGIT &quot;D&quot;
6630
dur-hour     = 1*DIGIT &quot;H&quot; [dur-minute]
6631
dur-minute   = 1*DIGIT &quot;M&quot; [dur-second]
6632
dur-second   = 1*DIGIT &quot;S&quot;
6633
date<sup>3</sup>        = (array) ( &quot;year&quot;  =&gt; (int) year // <span class="comment"><a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
6634
                       , &quot;month&quot; =&gt; (int) month
6635
                       , &quot;day&quot;   =&gt; (int) day
6636
                      [, &quot;hour&quot;  =&gt; (int) hour
6637
                       , &quot;min&quot;   =&gt; (int) min
6638
                       , &quot;sec&quot;   =&gt; (int) sec ])
6639
date<sup>3</sup>        = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment"><a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
6640
date<sup>3</sup>        = (string) datetime string<sup>*</sup>
6641
params<sup>4</sup>      = (array) ( [[ reltype [, trigRelparam ]] / datetimeparam ] *[, xparams ] )
6642
reltyp       = &quot;RELATED&quot; =&gt; &quot;START&quot; (default) / &quot;END&quot;
6643
trigRelparam = &quot;VALUE&quot; =&gt; &quot;DURATION&quot;
6644
datetimeparam= &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">mandatory if DATE-TIME</span>
6645
xparams      = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6646
<br>datetime string<sup>*</sup> recommended formats
6647
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
6648
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
6649
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
6650
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
6651
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
6652
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
6653
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
6654
<p class="label">Example 1</p>
6655
<p>A duration, 1 hour 2 min 3 sec, before start</p>
6656
<p class="example">&lt;?php
6657
.. .
6658
$valarm-&gt;setProperty( &quot;trigger&quot;
6659
                    , FALSE, FALSE, FALSE, FALSE, 1, 2, 3 );
6660
.. .
6661
</p>
6662
<p class="label">Example 2</p>
6663
<p>A duration, 1 hour 2 min 3 sec, before start</p>
6664
<p class="example">&lt;?php
6665
.. .
6666
$valarm-&gt;setProperty( &quot;trigger&quot;
6667
                    , array (&quot;hour&quot;=&gt;1,&quot;min&quot;=&gt;2,&quot;sec&quot;=&gt;3 );
6668
.. .
6669
</p>
6670
<p class="label">Example 3</p>
6671
<p>A duration, 1 hour 2 min 3 sec, before start</p>
6672
<p class="example">&lt;?php
6673
.. .
6674
$valarm-&gt;setProperty( &quot;trigger&quot;
6675
                    , &quot;PT1H2M3S&quot; );
6676
.. .
6677
</p>
6678
<p class="label">Example 4</p>
6679
<p>A duration, 1 week after end.</p>
6680
<p class="example">&lt;?php
6681
.. .
6682
$valarm-&gt;setProperty( &quot;trigger&quot;
6683
                    , FALSE, FALSE, FALSE, 1
6684
                    , FALSE, FALSE, FALSE, FALSE, FALSE );
6685
.. .
6686
</p>
6687
<p class="label">Example 5</p>
6688
<p>A duration, 1 week after end.</p>
6689
<p class="example">&lt;?php
6690
.. .
6691
$valarm-&gt;setProperty( &quot;trigger&quot;
6692
                    , array ( &quot;week&quot; =&gt; 1
6693
                            , &quot;relatedStart&quot; =&gt; FALSE
6694
                            , &quot;before&quot;       =&gt; FALSE ));
6695
.. .
6696
</p>
6697
<p class="label">Example 6</p>
6698
<p>A duration, 1 week after end.</p>
6699
<p class="example">&lt;?php
6700
.. .
6701
$valarm-&gt;setProperty( &quot;trigger&quot;
6702
                    , &quot;P1W&quot;
6703
                    , array( &quot;related&quot; =&gt; &quot;END&quot; ));
6704
.. .
6705
</p>
6706
<p class="label">Example 7</p>
6707
<p class="example">&lt;?php
6708
.. .
6709
$valarm-&gt;setProperty( &quot;trigger&quot;
6710
                    , array( &quot;year&quot; =&gt; 2007
6711
                           , &quot;month&quot; =&gt; 6
6712
                           , &quot;day&quot;   =&gt; 5,
6713
                           , &quot;hour&quot;  =&gt; 2
6714
                           , &quot;min&quot;   =&gt; 2
6715
                           , &quot;sec&quot;   =&gt; 3 )
6716
                    , array( &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; ));
6717
.. .
6718
</p>
6719
<br>
6720
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6721

    
6722

    
6723
<a name="TZID"></a><h3>3.2.41 TZID</h3>
6724
<p>
6725
This property specifies the text value that uniquely identifies the <a href="#VTIMEZONE">VTIMEZONE</a>
6726
<strong>calendar</strong> component and is REQUIRED, but MUST NOT occur more than once.
6727
</p>
6728
<p>The value type for TZID is TEXT.</p>
6729
<h5>Create TZID</h5>
6730
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6731
<p class="label">Format</p>
6732
<p class="format">vtimezone::createTzid()</p>
6733
<p class="label">Example</p>
6734
<p class="example">&lt;?php
6735
.. .
6736
$str = $component-&gt;createTzid();
6737
.. .
6738
</p>
6739
<h5>Delete TZID</h5>
6740
<p>Remove TZID from component.</p>
6741
<p class="label">Format</p>
6742
<p class="format">vtimezone::deleteProperty( &quot;TZID&quot; )</p>
6743
<p class="label">Example</p>
6744
<p class="example">&lt;?php
6745
.. .
6746
$vtimezone-&gt;deleteProperty( &quot;TZID&quot; );
6747
.. .
6748
</p>
6749
<h5>Get TZID</h5>
6750
<p>If set, returns property value, otherwise FALSE.</p>
6751
<p class="label">Format 1</p>
6752
<p class="format">vtimezone::getProperty( &quot;TZID&quot; )</p>
6753
<p class="comment">output = tzid<sup>1</sup></p>
6754
<p class="label">Format 2</p>
6755
<p class="format">vtimezone::getProperty( &quot;TZID&quot;, FALSE , TRUE )</p>
6756
<p class="comment">output = array( &quot;value&quot;  =&gt; tzid<sup>1</sup>
6757
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6758
<p class="label">Example</p>
6759
<p class="example">&lt;?php
6760
.. .
6761
$tzid = $vtimezone-&gt;getProperty( &quot;TZID&quot; );
6762
.. .
6763
</p>
6764
<h5>Set TZID</h5>
6765
<p>Insert property value.</p>
6766
<p class="label">Format</p>
6767
<p class="format">vtimezone::setProperty( &quot;tzid&quot;, tzid [, xparams ] )</p>
6768
<p class="comment">tzid<sup>1</sup>    = (string) Value type TEXT
6769
xparams<sup>2</sup> = (array)( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6770
</p>
6771
<p class="label">Example</p>
6772
<p class="example">&lt;?php
6773
.. .
6774
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6775
$vcalendar = new vcalendar( $config );
6776
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6777
$vtimezone-&gt;setProperty( &quot;tzid&quot;, &quot;US-Eastern&quot; );
6778
.. .
6779
</p>
6780
<br>
6781
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6782

    
6783

    
6784
<a name="TZNAME"></a><h3>3.2.42 TZNAME</h3>
6785
<p>
6786
This property specifies the customary designation for a <a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> description
6787
and is OPTIONAL and MAY occur more than once.
6788
</p>
6789
<p>The value type for TZNAME is TEXT.</p>
6790
<h5>Create TZNAME</h5>
6791
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6792
<p class="label">Format</p>
6793
<p class="format">vtimezone::createTzname()</p>
6794
<p class="label">Example</p>
6795
<p class="example">&lt;?php
6796
.. .
6797
$str = $component-&gt;createTzname();
6798
.. .
6799
</p>
6800
<h5>Delete TZNAME</h5>
6801
<p>Remove TZNAME from component.</p>
6802
<p class="label">Format</p>
6803
<p class="format">vtimezone::deleteProperty( &quot;TZNAME&quot; )</p>
6804
<p class="label">Example 1</p>
6805
<p>Delete (single/first) TZNAME property.</p>
6806
<p class="example">&lt;?php
6807
.. .
6808
$vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot; );
6809
.. .
6810
</p>
6811
<p class="label">Example 2</p>
6812
<p>Delete TZNAME property no 2.</p>
6813
<p class="example">&lt;?php
6814
.. .
6815
$vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot;, 2 );
6816
.. .
6817
</p>
6818
<p class="label">Example 3</p>
6819
<p>Deleting all TZNAME properties.</p>
6820
<p class="example">&lt;?php
6821
.. .
6822
while( $vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot; ))
6823
  continue;
6824
.. .
6825
</p>
6826
<h5>Get TZNAME</h5>
6827
<p>If set, returns property value, otherwise FALSE.</p>
6828
<p class="label">Format 1</p>
6829
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot; )</p>
6830
<p class="comment">output = tzname<sup>1</sup></p>
6831
<p class="label">Format 2</p>
6832
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot;, propOrderNo/FALSE, TRUE )</p>
6833
<p class="comment">propOrderNo = (int) specific property value</p>
6834
<p class="comment">output = array( &quot;value&quot;  =&gt; tzname<sup>1</sup>
6835
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
6836
<p class="label">Format 3</p>
6837
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot;, propOrderNo )</p>
6838
<p class="comment">propOrderNo = (int) specific property value</p>
6839
<p class="comment">Get propOrderNo TZNAME</p>
6840
<p class="label">Example</p>
6841
<p class="example">&lt;?php
6842
.. .
6843
$tzname = $timezonestandard-&gt;getProperty( &quot;TZNAME&quot; );
6844
.. .
6845
</p>
6846
<h5>Set TZNAME</h5>
6847
<p>Insert property value.</p>
6848
<p class="label">Format</p>
6849
<p class="format">vtimezone::setProperty( &quot;tzname&quot;, tzname [, params [, propOrderNo ]] )</p>
6850
<p class="comment">tzname<sup>1</sup>     = (string) Value type TEXT
6851
params<sup>2</sup>     = (array) ( [ &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; ]*[, xparams ] )
6852
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6853
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
6854
lang<sup>*</sup>       = as defined in [RFC5646]</p>
6855
<p class="label">Example</p>
6856
<p class="example">&lt;?php
6857
.. .
6858
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6859
$vcalendar = new vcalendar( $config );
6860
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6861
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
6862
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
6863
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
6864
$standard-&gt;setProperty( &quot;tzname&quot;, &quot;EST&quot; );
6865
.. .
6866
</p>
6867
<br>
6868
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6869

    
6870

    
6871
<a name="TZOFFSETFROM"></a><h3>3.2.43 TZOFFSETFROM</h3>
6872
<p>
6873
This property specifies the offset which is in use prior to this <a href="#VTIMEZONE">TIMEZONE</a> observance.
6874
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
6875
</p>
6876
<p>The value type is UTC-OFFSET, &quot;+&quot; / &quot;-&quot; time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
6877
<h5>Create TZOFFSETFROM</h5>
6878
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6879
<p class="label">Format</p>
6880
<p class="format">vtimezone::createTzoffsetfrom()</p>
6881
<p class="label">Example</p>
6882
<p class="example">&lt;?php
6883
.. .
6884
$str = $component-&gt;createTzoffsetfrom();
6885
.. .
6886
</p>
6887
<h5>Delete TZOFFSETFROM</h5>
6888
<p>Remove TZOFFSETFROM from component.</p>
6889
<p class="label">Format</p>
6890
<p class="format">vtimezone::deleteProperty( &quot;TZOFFSETFROM&quot; )</p>
6891
<p class="label">Example</p>
6892
<p class="example">&lt;?php
6893
.. .
6894
$vtimezonestd-&gt;deleteProperty( &quot;TZOFFSETFROM&quot; );
6895
.. .
6896
</p>
6897
<h5>Get TZOFFSETFROM</h5>
6898
<p>If set, returns property value, otherwise FALSE.</p>
6899
<p class="label">Format 1</p>
6900
<p class="format">vtimezone::getProperty( &quot;TZOFFSETFROM&quot; )</p>
6901
<p class="comment">output = tzoffsetfrom<sup>1</sup></p>
6902
<p class="label">Format 2</p>
6903
<p class="format">vtimezone::getProperty( &quot;TZOFFSETFROM&quot;, FALSE , TRUE )</p>
6904
<p class="comment">output = array( &quot;value&quot;  =&gt; tzoffsetfrom<sup>1</sup>
6905
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6906
<p class="label">Example</p>
6907
<p class="example">&lt;?php
6908
.. .
6909
$tzoffsetfrom = $timezonestandard-&gt;getProperty( &quot;TZOFFSETFROM&quot; );
6910
.. .
6911
</p>
6912
<h5>Set TZOFFSETFROM</h5>
6913
<p>Insert property value.</p>
6914
<p class="label">Format</p>
6915
<p class="format">vtimezone::setProperty( &quot;tzoffsetfrom&quot;, tzoffsetfrom [, xparams ] )</p>
6916
<p class="comment">tzoffsetfrom<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
6917
xparams<sup>2</sup>      = (array) ( *[ /string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6918
</p>
6919
<p class="label">Example</p>
6920
<p class="example">&lt;?php
6921
.. .
6922
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6923
$vcalendar = new vcalendar( $config );
6924
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6925
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
6926
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
6927
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
6928
$standard-&gt;setProperty( &quot;tzname&quot;, &quot;EST&quot; );
6929
$standard-&gt;setProperty( &quot;tzoffsetfrom&quot;, &quot;-0500&quot; );
6930
.. .
6931
</p>
6932
<br>
6933
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6934

    
6935

    
6936
<a name="TZOFFSETTO"></a><h3>3.2.44 TZOFFSETTO</h3>
6937
<p>
6938
This property specifies the offset which is in use in this <a href="#VTIMEZONE">TIMEZONE</a> observance.
6939
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
6940
</p>
6941
<p>The value type is UTC-OFFSET, &quot;+&quot; / &quot;-&quot; time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
6942
<h5>Create TZOFFSETTO</h5>
6943
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6944
<p class="label">Format</p>
6945
<p class="format">vtimezone::createTzoffsetto()</p>
6946
<p class="label">Example</p>
6947
<p class="example">&lt;?php
6948
.. .
6949
$str = $component-&gt;createTzoffsetto();
6950
.. .
6951
</p>
6952
<h5>Delete TZOFFSETTO</h5>
6953
<p>Remove TZOFFSETTO from component.</p>
6954
<p class="label">Format</p>
6955
<p class="format">vtimezone::deleteProperty( &quot;TZOFFSETTO&quot; )</p>
6956
<p class="label">Example</p>
6957
<p class="example">&lt;?php
6958
.. .
6959
$daylight-&gt;deleteProperty( &quot;TZOFFSETTO&quot; );
6960
.. .
6961
</p>
6962
<h5>Get TZOFFSETTO</h5>
6963
<p>If set, returns property value, otherwise FALSE.</p>
6964
<p class="label">Format 1</p>
6965
<p class="format">vtimezone::getProperty( &quot;TZOFFSETTO&quot; )</p>
6966
<p class="comment">output = tzoffsetto<sup>1</sup></p>
6967
<p class="label">Format 2</p>
6968
<p class="format">vtimezone::getProperty( &quot;TZOFFSETTO&quot;, FALSE , TRUE )</p>
6969
<p class="comment">output = array( &quot;value&quot;  =&gt; tzoffsetto<sup>1</sup>
6970
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6971
<p class="label">Example</p>
6972
<p class="example">&lt;?php
6973
.. .
6974
$tzoffsetto = $timezonestandard-&gt;getProperty( &quot;TZOFFSETTO&quot; );
6975
.. .
6976
</p>
6977
<h5>Set TZOFFSETTO</h5>
6978
<p>Insert property value.</p>
6979
<p class="label">Format</p>
6980
<p class="format">vtimezone::setProperty( &quot;tzoffsetto&quot;, tzoffsetto [, xparams ] )</p>
6981
<p class="comment">tzoffsetto<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
6982
xparams<sup>2</sup>    = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6983
</p>
6984
<p class="label">Example</p>
6985
<p class="example">&lt;?php
6986
.. .
6987
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6988
$vcalendar = new vcalendar( $config );
6989
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6990
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
6991
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
6992
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
6993
.. .
6994
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
6995
$daylight-&gt;setProperty( &quot;tzoffsetto&quot;, &quot;1345&quot; );
6996
.. .
6997
</p>
6998
<br>
6999
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7000

    
7001

    
7002
<a name="TZURL"></a><h3>3.2.45 TZURL</h3>
7003
<p>
7004
The TZURL provides a means for a <a href="#VTIMEZONE">VTIMEZONE</a> component to point to
7005
a network location that can be used to retrieve an up-to-date version of itself. The property
7006
is OPTIONAL and MUST NOT occur more than once.
7007
</p>
7008
<p> The value type is URI.</p>
7009
<h5>Create TZURL</h5>
7010
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
7011
<p class="label">Format</p>
7012
<p class="format">vtimezone::createTzurl()</p>
7013
<p class="label">Example</p>
7014
<p class="example">&lt;?php
7015
.. .
7016
$str = $component-&gt;createTzurl();
7017
.. .
7018
</p>
7019
<h5>Delete TZURL</h5>
7020
<p>Remove TZURL from component.</p>
7021
<p class="label">Format</p>
7022
<p class="format">vtimezone::deleteProperty( &quot;TZURL&quot; )</p>
7023
<p class="label">Example</p>
7024
<p class="example">&lt;?php
7025
.. .
7026
$vtimezone-&gt;deleteProperty( &quot;TZURL&quot; );
7027
.. .
7028
</p>
7029
<h5>Get TZURL</h5>
7030
<p>If set, returns property value, otherwise FALSE.</p>.
7031
<p class="label">Format 1</p>
7032
<p class="format">vtimezone::getProperty( &quot;TZURL&quot; )</p>
7033
<p class="comment">output = tzurl<sup>1</sup></p>
7034
<p class="label">Format 2</p>
7035
<p class="format">vtimezone::getProperty( &quot;TZURL&quot;, FALSE , TRUE )</p>
7036
<p class="comment">output = array( &quot;value&quot;  =&gt; tzurl<sup>1</sup>
7037
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
7038
<p class="label">Example</p>
7039
<p class="example">&lt;?php
7040
.. .
7041
$tzurl = $timezonestandard-&gt;getProperty( &quot;TZURL&quot; );
7042
.. .
7043
</p>
7044
<h5>Set TZURL</h5>
7045
<p>Insert property value.</p>
7046
<p class="label">Format</p>
7047
<p class="format">vtimezone::setProperty( &quot;tzurl&quot;, tzurl [, xparams ] )</p>
7048
<p class="comment">tzurl<sup>1</sup>   = (string) Value type URI
7049
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
7050
</p>
7051
<p class="label">Example</p>
7052
<p class="example">&lt;?php
7053
.. .
7054
$tz        = &quot;http://zones.stds_r_us.net/tz/US-Eastern&quot; );
7055
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
7056
$vcalendar = new vcalendar( $config );
7057
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
7058
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
7059
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101T000000&quot; );
7060
$vtimezone-&gt;setProperty( &quot;tzurl&quot;, $tz );
7061
.. .
7062
</p>
7063
<br>
7064
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7065

    
7066

    
7067
<a name="UID"></a><h3>3.2.46 UID</h3>
7068
<p>
7069
The persistent, globally <b>U</b>nique <b>ID</b>entifier for the <strong>calendar</strong> component.
7070
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
7071
<a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.<br>
7072
However, UID is <b>AUTOMATICALLY</b> generated in iCalcreator and configuration <a href="#Unique_id">unique_id</a>
7073
is used when auto-creating component UID.
7074
</p>
7075
<p>UID generated format :</p>
7076
<p class="format">date(&quot;Ymd\THisT&quot;).&quot;-&quot;.[microSec][random].&quot;@&quot;.<a href="#Unique_id">unique_id</a></p>
7077
<p>
7078
microSec = microseconds, 4 pos<br>
7079
random    = 6 characters aA-zZ, 0-9
7080
</p>
7081
<p class="label">Example</p>
7082
<p class="example">&quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;</p>
7083
<p>
7084
UID may be required when importing iCal files into some <strong>calendar</strong> software (MS etc.),
7085
as well as (<strong>calendar</strong>) properties <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE",
7086
<a href="#METHOD">METHOD</a> (value PUBLISH etc.) and the (also automatically created) <a href="#DTSTAMP">DTSTAMP</a> property.
7087
</p>
7088
<p>The value type for UID is TEXT.</p>
7089
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) UID values.</p>
7090
<h5>Create UID</h5>
7091
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
7092
<p class="label">Format</p>
7093
<p class="format">calendarComponent::createUid()</p>
7094
<p class="label">Example</p>
7095
<p class="example">&lt;?php
7096
.. .
7097
$str = $component-&gt;createUid();
7098
.. .
7099
</p>
7100
<h5>Delete UID</h5>
7101
<p>
7102
If UID is remove from a component, UID will automatically be recreated when iCalcreator object output methods
7103
like <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a>
7104
or <a href="#saveCalendar">saveCalendar</a> is executed.
7105
</p>
7106
<p class="label">Format</p>
7107
<p class="format">calendarComponent::deleteProperty( &quot;UID&quot; )</p>
7108
<p class="label">Example</p>
7109
<p class="example">&lt;?php
7110
.. .
7111
$vevent-&gt;deleteProperty( &quot;UID&quot; );
7112
.. .
7113
</p>
7114
<h5>Get UID</h5>
7115
<p>If set, returns property, otherwise FALSE.</p>
7116
<p class="label">Format 1</p>
7117
<p class="format">calendarComponent::getProperty( &quot;UID&quot; )</p>
7118
<p class="comment">output = uid<sup>1</sup></p>
7119
<p class="label">Format 2</p>
7120
<p class="format">calendarComponent::getProperty( &quot;UID&quot;, FALSE , TRUE )</p>
7121
<p class="comment">output = array( &quot;value&quot;  =&gt; uid<sup>1</sup>
7122
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
7123
<p class="label">Example</p>
7124
<p class="example">&lt;?php
7125
.. .
7126
$uid = $vevent-&gt;getProperty( &quot;UID&quot; );
7127
.. .
7128
</p>
7129
<h5>Set UID</h5>
7130
<p>Insert property value, overrides any previously set or auto-created UID.</p>
7131
<p>
7132
Do <b>NOT</b> use an integer UID or only a component name in UID (ex. &quot;vevent&quot;),
7133
this may cause malfunction in iCalcreator object method <a href="#setComponent">setComponent</a> with index or UID argument.
7134
</p>
7135
<p class="label">Format</p>
7136
<p class="format">calendarComponent::setProperty( &quot;uid&quot;, uid [, xparams ] )</p>
7137
<p class="comment">uid<sup>1</sup>     = (string) Value type TEXT
7138
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
7139
</p>
7140
<p class="label">Example</p>
7141
<p class="example">&lt;?php
7142
.. .
7143
$vevent-&gt;setProperty(&quot;uid&quot;,&quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;);
7144
.. .
7145
</p>
7146
<p>
7147
BUT, due to poorly created iCal media files, a digit UID is accepted in the setProperty( UID ) and <a href="#parse_merge">parse()</a> methods.
7148
Do check for component digit UIDs and remove it (will force a (auto) UID recreation) or (re-)set it manually.
7149
</p>
7150
<p class="example">&lt;?php
7151
.. .
7152
if( ctype_digit( $vevent-&gt;getProperty( &quot;UID&quot; )))
7153
  $vevent-&gt;deleteProperty( &quot;UID&quot; );
7154
.. .
7155
</p>
7156
<br>
7157
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7158

    
7159

    
7160
<a name="URL"></a><h3>3.2.47 URL</h3>
7161
<p>
7162
This property defines a Uniform Resource Locator (URL) associated with the <strong>iCalendar</strong> object.
7163
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
7164
<a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
7165
</p>
7166
<p> The value type is URI.</p>
7167
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) URL values.</p>
7168
<h5>Create URL</h5>
7169
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
7170
<p class="label">Format</p>
7171
<p class="format">calendarComponent::createUrl()</p>
7172
<p class="label">Example</p>
7173
<p class="example">&lt;?php
7174
.. .
7175
$str = $component-&gt;createUrl();
7176
.. .
7177
</p>
7178
<h5>Delete URL</h5>
7179
<p>Remove URL from component.</p>
7180
<p class="label">Format</p>
7181
<p class="format">calendarComponent::deleteProperty( &quot;URL&quot; )</p>
7182
<p class="label">Example</p>
7183
<p class="example">&lt;?php
7184
.. .
7185
$vevent-&gt;deleteProperty( &quot;URL&quot; );
7186
.. .
7187
</p>
7188
<h5>Get URL</h5>
7189
<p>If set, returns property value, otherwise FALSE.</p>
7190
<p class="label">Format 1</p>
7191
<p class="format">calendarComponent::getProperty( &quot;URL&quot; )</p>
7192
<p class="comment">output = url<sup>1</sup></p>
7193
<p class="label">Format 2</p>
7194
<p class="format">calendarComponent::getProperty( &quot;URL&quot;, FALSE , TRUE )</p>
7195
<p class="comment">output = array &quot;value&quot;   =&gt; url<sup>1</sup>
7196
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
7197
<p class="label">Example</p>
7198
<p class="example">&lt;?php
7199
.. .
7200
$url = $vevent-&gt;getProperty( &quot;URL&quot; );
7201
.. .
7202
</p>
7203
<h5>Set URL</h5>
7204
<p>Insert property value.</p>
7205
<p class="label">Format</p>
7206
<p class="format">calendarComponent::setProperty( &quot;url&quot;, url [, xparams ] )</p>
7207
<p class="comment">url<sup>1</sup>     = (string) Value type URI
7208
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
7209
</p>
7210
<p class="label">Example</p>
7211
<p class="example">&lt;?php
7212
.. .
7213
$vtodo-&gt;setProperty( &quot;url&quot;, &quot;http://www.icaldomain.net&quot; );
7214
.. .
7215
</p>
7216
<br>
7217
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7218

    
7219

    
7220
<a name="X-PROPERTY_PROP"></a><h3>3.2.48 X-PROPERTY</h3>
7221
<p>
7222
A component, non-standard property with a TEXT value and a name with an &quot;X-&quot; prefix. In a component,
7223
an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
7224
</p>
7225
<p>The value type is TEXT.</p>
7226
<h5>Create X-PROPERTY</h5>
7227
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
7228
<p class="label">Format</p>
7229
<p class="format">calendarComponent::createXprop()</p>
7230
<p class="label">Example</p>
7231
<p class="example">&lt;?php
7232
.. .
7233
$str = $component-&gt;createxProp();
7234
.. .
7235
</p>
7236
<h5>Delete X-PROPERTY</h5>
7237
<p>Remove X-PROPERTY from component.</p>
7238
<p class="label">Format</p>
7239
<p class="format">calendarComponent::deleteProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
7240
<p class="label">Example 1</p>
7241
<p>Deleting x-property named &quot;X-PROPERTY&quot;.</p>
7242
<p class="example">&lt;?php
7243
.. .
7244
$vevent-&gt;deleteProperty( &quot;X-PROPERTY&quot; );
7245
.. .
7246
</p>
7247
<p class="label">Example 2</p>
7248
<p>Deleting all x-properties.</p>
7249
<p class="example">&lt;?php
7250
.. .
7251
while( $vevent-&gt;deleteProperty())
7252
  continue;
7253
.. .
7254
</p>
7255
<h5>Get X-property</h5>
7256
<p>If set, returns property value, otherwise FALSE.</p>
7257
<p class="label">Format 1</p>
7258
<p class="format">calendarComponent::getProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
7259
<p class="comment">output = array( propertyName<sup>1</sup>
7260
              , propertyData<sup>2</sup> )</p>
7261
<p class="label">Format 2</p>
7262
<p class="format">calendarComponent::getProperty()</p>
7263
<p class="comment">output = array( propertyName<sup>1</sup>
7264
              , propertyData<sup>2</sup> )</p>
7265
<p class="label">Format 3</p>
7266
<p class="format">calendarComponent::getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
7267
<p class="comment">propOrderNo = (int) specific property value</p>
7268
<p class="comment">output = array( propertyName<sup>1</sup>
7269
              , array ( &quot;value&quot;  =&gt; propertyData<sup>2</sup> )
7270
                      , &quot;params&quot; =&gt; params<sup>3</sup>))</p>
7271
<p class="label">Format 4</p>
7272
<p class="format">calendarComponent::getProperty( FALSE, propOrderNo )</p>
7273
<p class="comment">propOrderNo = (int) specific property value</p>
7274
<p class="comment">Get propOrderNo X-property</p>
7275

    
7276
<p class="label">Example 1</p>
7277
<p class="example">&lt;?php
7278
.. .
7279
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7280
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7281
$vcalendar = new vcalendar( $config );
7282
$vcalendar-&gt;parse();
7283
if( FALSE !== ( $d = $vcalendar-&gt;getProperty( &quot;X-WR-TIMEZONE&quot; )))
7284
   echo $d[1]; <span class="comment">// $d = array( &quot;X-WR-TIMEZONE&quot;, propertyData<sup>2</sup> )</span>
7285
.. .
7286
</p>
7287

    
7288
<p class="label">Example 2</p>
7289
<p class="example">&lt;?php
7290
.. .
7291
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7292
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7293
$vcalendar = new vcalendar( $config );
7294
$vcalendar-&gt;parse();
7295
while( $xprop = $vcalendar-&gt;getProperty( )) {<span class="comment">// $xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
7296
.. .
7297
</p>
7298

    
7299

    
7300
<p class="label">Example 3</p>
7301
<p class="example">&lt;?php
7302
.. .
7303
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7304
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7305
$vcalendar = new vcalendar( $config );
7306
$vcalendar-&gt;parse();
7307
while( $xprop = $vcalendar-&gt;getProperty( &quot;X-ABC-MMSUBJ&quot; )) {
7308
.. .     <span class="comment">// $xprop = array( &quot;X-ABC-MMSUBJ&quot;, propertyData<sup>2</sup> )</span>
7309
.. .
7310
</p>
7311

    
7312
<p class="label">Example 4</p>
7313
<p class="example">&lt;?php
7314
.. .
7315
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7316
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7317
$vcalendar = new vcalendar( $config );
7318
$vcalendar-&gt;parse();
7319
while( $xprop = $vcalendar-&gt;getProperty( FALSE, FALSE, TRUE )) {
7320
       /*<span class="comment"> $xprop = array( propertyName<sup>1</sup>
7321
                                      , array( &quot;value&quot;    =&gt; propertyData<sup>2</sup> )
7322
                                                , &quot;params&quot; =&gt; params<sup>3</sup> )</span>
7323
       */
7324
.. .
7325
</p>
7326
<h5>Set X-property</h5>
7327
<p>Insert property name and value. If an x-prop with the same name already exists, it will be replaced.</p>
7328
<p class="label">Format</p>
7329
<p class="format">calendarComponent::setProperty( propertyName, propertyData [, params ] )</p>
7330
<p class="comment">propertyName<sup>1</sup> = (string) Any property name with a &quot;X-&quot; prefix
7331
propertyData<sup>2</sup> = (string) Value type TEXT
7332
params<sup>3</sup>       = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams] )
7333
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
7334
lang<sup>*</sup>         = as defined in [RFC5646]</p>
7335
<p class="label">Example</p>
7336
<p class="example">&lt;?php
7337
.. .
7338
$component-&gt;setProperty(&quot;X-ABC-MMSUBJ&quot;,&quot;http://load.noise.org/mysubj.wav&quot;);
7339
.. .
7340
</p>
7341
<br>
7342
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7343

    
7344

    
7345
<a NAME="iCalcreator_component_configuration_methods"></a><h2>3.3 iCalcreator Component configuration methods</h2>
7346

    
7347
<a name="Language_PROP"></a><h3>3.3.1 Language</h3>
7348
Language for specific <strong>calendar</strong> component as defined in [RFC5646].<br>
7349
Language set at component level can be overridden by specific component property parameter.<br>
7350
A successful &quot;setConfig&quot; returns TRUE.
7351
<h5>Get language</h5>
7352
Language for <strong>calendar</strong> (only if language is set at component level).
7353
<p class="label">Format</p>
7354
<p class="format">calendarComponent::getConfig( &quot;language&quot; )</p>
7355
<p class="label">Example</p>
7356
<p class="example">&lt;?php
7357
.. .
7358
$lang = $vevent-&gt;getConfig( &quot;language&quot; );
7359
.. .
7360
</p>
7361
<h5>Set LANGUAGE</h5>
7362
<p class="label">Format</p>
7363
<p class="format">calendarComponent::setConfig( &quot;language&quot;, lang )</p>
7364
<p class="comment">lang = (string) language</p>
7365
<p class="label">Example</p>
7366
<p class="example">&lt;?php
7367
.. .
7368
$vevent-&gt;setConfig( &quot;language&quot;, &quot;en&quot; );
7369
.. .
7370
</p>
7371
<br>
7372
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7373

    
7374

    
7375
<a name="iCalcreator_component_object_misc_methods"></a><h2>3.4 iCalcreator component object misc. methods</h2>
7376
<p>Calendar component subcomponent functions.</p>
7377

    
7378
<a name="deleteComponent_PROP"></a><h4>3.4.1 deleteComponent</h4>
7379
Remove subcomponent from component.
7380
<p class="label">Format</p>
7381
<p class="format">calendarComponent::deleteComponent( orderNumber )</p>
7382
<p class="comment">orderNumber = (int) component order Number</p>
7383
<p class="comment">Remove component with order number (1st=1, 2nd=2.. .).</p>
7384
<p class="format">calendarComponent::deleteComponent( componentType [, componentSuborderNumber])</p>
7385
<p class="comment">componentType = (string) component type
7386
componentSuborderNumber = (int) component suborder number</p>
7387
<p class="comment">Remove component with component type (ex. &quot;vevent&quot;)
7388
and order 1 alt. suborder number.</p>
7389
<p class="format">calendarComponent::deleteComponent( <a href="#UID">UID</a> )</p>
7390
<p class="comment">Remove component with <a href="#UID">UID</a>.
7391
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timezone</a> components.</p>
7392
<p class="label">Example 1</p>
7393
<p>Delete first subcomponent.</p>
7394
<p class="example">&lt;?php
7395
.. .
7396
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7397
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
7398
$vcalendar = new vcalendar( $config );
7399
$vcalendar-&gt;parse();
7400
$comp1     = $vcalendar-&gt;getComponent();
7401
$comp1-&gt;deleteComponent( 1 );
7402
.. .
7403
</p>
7404
<p class="label">Example 2</p>
7405
<p>Delete all subcomponents.</p>
7406
<p class="example">&lt;?php
7407
.. .
7408
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7409
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
7410
$vcalendar = new vcalendar( $config );
7411
$vcalendar-&gt;parse();
7412
$comp1     = $vcalendar-&gt;getComponent();
7413
while( $comp1-&gt;deleteComponent( &quot;valarm&quot; )
7414
  continue;
7415
.. .
7416
</p>
7417
<br>
7418
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7419

    
7420

    
7421
<a name="getComponent_PROP"></a><h4>3.4.2 getComponent</h4>
7422
Get subComponent from component.
7423
<p class="label">Format 1</p>
7424
<p class="format">calendarComponent::getComponent()</p>
7425
<p class="comment">Get next component until end-of-components.</p>
7426
<p class="label">Format 2</p>
7427
<p class="format">calendarComponent::getComponent( int orderNumber )</p>
7428
<p class="comment">orderNumber = (int) component order number</p>
7429
<p class="comment">Get component with order number (1st=1, 2nd=2.. .).</p>
7430
<p class="label">Format 3</p>
7431
<p class="format">calendarComponent::getComponent( string componentType [, int componentSuborderNumber])</p>
7432
<p class="comment">componentType = (string) component type
7433
componentSuborderNumber = (int) component suborder number</p>
7434
<p class="comment">Get (next) component with component type (until end-of-components)
7435
alt. component with component type and suborder number (1st=1, 2nd=2..).</p>
7436
<p class="label">Format 4</p>
7437
<p class="format">calendarComponent::getComponent( <a href="#UID">UID</a> )</p>
7438
<p class="comment">Get component with <a href="#UID">UID</a>.
7439
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timezone</a> components.</p>
7440
<p class="label">Example</p>
7441
<p class="example">&lt;?php
7442
.. .
7443
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7444
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
7445
$vcalendar = new vcalendar( $config );
7446
$vcalendar-&gt;parse();
7447
$comp1     = $vcalendar-&gt;getComponent());
7448
while( $subComp = $comp1-&gt;getComponent()) {
7449
.. .
7450
</p>
7451
<br>
7452
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7453

    
7454

    
7455
<a name="newComponent_PROP"></a><h4>3.4.3 newComponent</h4>
7456
Create subcomponent (<a href="#VALARM">ALARN</a> / <a href="#VTIMEZONE">VTIMEZONE STANDARD</a> / <a href="#VTIMEZONE">VTIMEZONE DAYLIGHT</a>)
7457
using a component factory-method, returning a reference to the new component.
7458
<p class="label">Format</p>
7459
<p class="format">calendarComponent::newComponent( componentType )</p>
7460
<p class="comment">componentType = (string) component type</p>
7461
<p class="label">Example 1</p>
7462
<p class="example">&lt;?php
7463
.. .
7464
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
7465
$vcalendar = new vcalendar( $config );
7466
...
7467
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
7468
             // <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
7469
$vevent-&gt;setProperty( &quot;dtstart&quot;, 2006, 12, 24, 19, 30, 00 );
7470
$vevent-&gt;setProperty(.. .
7471
...
7472
$valarm    = &amp; $vevent-&gt;newComponent( &quot;valarm&quot; );
7473
$valarm-&gt;setProperty( &quot;trigger&quot;, .. .
7474
...
7475
</p>
7476
<p class="label">Example 2</p>
7477
<p class="example">&lt;?php
7478
.. .
7479
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
7480
$vcalendar = new vcalendar( $config );
7481
...
7482
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
7483
$vtimezone-&gt;setProperty(.. .
7484
...
7485
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
7486
$standard-&gt;setProperty(.. .
7487
...
7488
$daylight = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
7489
$daylight-&gt;setProperty(.. .
7490
...
7491
</p>
7492

    
7493
<br>
7494
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7495

    
7496

    
7497
<a name="setComponent_PROP"></a><h4>3.4.4 setComponent</h4>
7498
Add <strong>calendar</strong> component to the iCalcreator object instance or replace/update component in the iCalcreator object instance.
7499
<p class="label">Format 1</p>
7500
<p class="format">calendarComponent::setComponent( component )
7501
addSubComponent( component ) // <span class="comment">alias</span></p>
7502
<p class="comment">Insert last in component chain.</p>
7503
<p class="label">Format 2</p>
7504
<p class="format">calendarComponent::setComponent( component, int orderNumber )</p>
7505
<p class="comment">orderNumber = (int) component order number</p>
7506
<p class="comment">Replace component with order number(1st=1, 2nd=2.. .).
7507
If orderNumber is not found, component is inserted last in chain.</p>
7508
<p class="label">Format 3</p>
7509
<p class="format">calendarComponent::setComponent( component, componentType [,componentSuborderNumber])</p>
7510
<p class="comment">componentType = (string) component type
7511
componentSuborderNumber = (int) component suborder number</p>
7512
<p class="comment">Replace component with component type and component order number.
7513
if orderNumber is not found, component is inserted last in chain. </p>
7514
<p class="label">Example</p>
7515
<p class="example">&lt;?php
7516
.. .
7517
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
7518
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
7519
.. .
7520
$vevent    = new vevent();
7521
            // <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
7522
$vevent-&gt;setProperty( &quot;dtstart&quot;, 2006, 12, 24, 19, 30, 00 );
7523
$vevent-&gt;setProperty(.. .
7524
.. .
7525
$valarm    = new valarm();
7526
$valarm-&gt;setProperty( &quot;trigger&quot;, .. .
7527
.. .
7528
$vevent-&gt;setComponent( $valarm );
7529
$vcalendar-&gt;setComponent( $vevent );
7530
.. .
7531
</p>
7532
<br>
7533
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7534

    
7535

    
7536
<a name="iCalUtilityFunctions"></a><h1>4 iCalUtilityFunctions</h1>
7537
<p>
7538
iCalUtilityFunctions class contains static functions used by iCalcreator,
7539
also usable outside the iCalcreator class.
7540
</p>
7541
<dl>
7542
<dt>&quot;External&quot; functions
7543
<dd><a href="#convEolChar">4.1 convEolChar</a>
7544
<dd><a href="#createTimezone">4.2 createTimezone</a>
7545
<dd><a href="#ms2phpTZ">4.3 ms2phpTZ</a>
7546
<dd><a href="#transformDateTime">4.4 transformDateTime</a>
7547
<dt>&quot;Internal&quot; functions
7548
<dd><a href="#mddtuf">4.5 Misc. date/duration/timestamp util. functions</a>
7549
</dl>
7550

    
7551

    
7552
<a name="convEolChar"></a><h4>4.1 convEolChar</h4>
7553
<p>Removes any line-endings that may include spaces or tabs (\t)
7554
and convert all line endings (iCal default &quot;\r\n&quot;),
7555
takes care of &quot;\r\n&quot;, &quot;\r&quot; and &quot;\n&quot; and mixed &quot;\r\n&quot;+&quot;\r&quot;, &quot;\r\n&quot;+&quot;\n&quot;.
7556
</p>
7557
<p>Returns string with controlled and corrected line endings.</p>
7558
<p class="label">Format</p>
7559
<p class="format">iCalUtilityFunctions::convEolChar( str, nl )</p>
7560
<p class="comment">str = (string) string to adjust
7561
nl  = line ending to convert to
7562
</p>
7563
<br>
7564
<br>
7565
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7566

    
7567

    
7568
<a name="createTimezone"></a><h4>4.2 createTimezone</h4>
7569
<p>
7570
The function, applied on a iCalcrator object instance and using a <em>PHP</em> valid timezone (as argument)
7571
creates <a href="#VTIMEZONE">vtimezone</a>, <a href="#STANDARD">standard</a> and <a href="#DAYLIGHT">daylight</a> components,
7572
based on <em>PHP</em> DateTimeZone class and the time zone transition dates.
7573
(<em>PHP</em> 5 >= 5.2.0)
7574
</p>
7575
<p>
7576
Recommendation is to call the function <b>after</b> editing components (and without (period) from/to arguments, below),
7577
 it will automatically create timezone components, starting seven month before lowest <a href="#DTSTART">DTSTART</a>
7578
 value and end 18 month after the higest.
7579
</p>
7580
<p>
7581
If no time zone transition exists within date arguments or within the &quot;<a href="#DTSTART">DTSTART</a>&quot;s span,
7582
then the time zone transition with the highest transistion date before &quot;from&quot; date is used as base.
7583
If still missing, timezone components are created, using current date.
7584
</p>
7585
<p>
7586
Note, only when timezone NOT is UTC.
7587
For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
7588
</p>
7589
<p>
7590
FALSE is returned if not using a <em>PHP</em> valid timezone.
7591
</p>
7592
<p class="label">Format</p>
7593
<p class="format">iCalUtilityFunctions::createTimezone( calendar, timezone [, xprops, [, from [, to ]]] )</p>
7594
<p class="comment">calendar = (object) iCalcreator instance
7595
timezone = (string) an <em>PHP</em> (DateTimeZone) valid timezone
7596
xprops   = (array) ( *[ x-propName =&gt; value ] ), timezone non-standard properties
7597
from     = (int) timestamp, period start date<sup>*</sup>
7598
to       = (int) timestamp, period end date<sup>*</sup>
7599

    
7600
<sup>*</sup> if empty &quot;from&quot; and &quot;to&quot; arguments, the calendar <a href="#getProperty2">getProperty</a> method (with &quot;<a href="#DTSTART">DTSTART</a>&quot; as argument)
7601
  is used to get the lowest (modified, minus 7 month) and highest (modified, plus 15 month) dates.
7602
</p>
7603
<p class="label">Example</p>
7604
<p class="example">&lt;?php
7605
.. .
7606
$tz     = &quot;Europe/Stockholm&quot;;
7607
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; $tz );
7608
$c      = new vcalendar( $config );
7609
$c-&gt;setProperty( "X-WR-TIMEZONE", $tz );
7610
.. .
7611
.. .  // <span class="comment">insert components or parse an iCal file</span>
7612
.. .
7613
$xprops = array( &quot;X-LIC-LOCATION&quot; => $tz );
7614
iCalUtilityFunctions::createTimezone( $c, $tz, $xprops );
7615
.. .
7616
</p>
7617
<p>
7618
Output example (when using iCalcreator object createCalendar or returnCalendar methods):
7619
</p>
7620
<p class="example">BEGIN:VTIMEZONE
7621
TZID:Europe/Stockholm
7622
X-LIC-LOCATION:Europe/Stockholm
7623
BEGIN:STANDARD
7624
DTSTART:20111030T003000
7625
TZOFFSETFROM:+0200
7626
TZOFFSETTO:+0100
7627
TZNAME:CET
7628
END:STANDARD
7629
BEGIN:DAYLIGHT
7630
DTSTART:20110327T002000
7631
TZOFFSETFROM:+0100
7632
TZOFFSETTO:+0200
7633
TZNAME:CEST
7634
END:DAYLIGHT
7635
END:VTIMEZONE
7636
</p>
7637
<br>
7638
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7639

    
7640

    
7641
<a name="ms2phpTZ"></a><h4>4.3 ms2phpTZ</h4>
7642
<p>
7643
Conversion (very simple) of a MS timezone to a <em>PHP</em>5 valid (Date-)timezone,<br>
7644
matching (MS) UTC offset and time zone descriptors, based on <em>PHP</em> DateTimeZone class.
7645
(<em>PHP</em> 5 >= 5.2.0)
7646
</p>
7647
<p>If TRUE is returned, the MS timezone argument (below) is converted to a <em>PHP</em>5 time zone, otherwise unaltered.</p>
7648
<p class="label">Format</p>
7649
<p class="format">iCalUtilityFunctions::ms2phpTZ( timezone )</p>
7650
<p class="comment">timezone = (string) MS timezone (input), PHP5 timezone (output)</p>
7651
<p class="label">Example</p>
7652
<p class="example">&lt;?php
7653
.. .
7654
$search = '"(UTC-06:00) Central Time (US & Canada)"';
7655
echo "MS  tz:'$search'&lt;br&gt;\n";
7656
if( FALSE !== iCalUtilityFunctions::ms2phpTZ( $search ))
7657
  echo "PHP tz:'$search'&lt;br&gt;\n";
7658
.. .
7659
</p>
7660
<br>
7661
<br>
7662
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7663

    
7664

    
7665
<a name="transformDateTime"></a><h4>4.4 transformDateTime</h4>
7666
<p>
7667
Transforms a datetime from a time zone to another. (Requires <em>PHP</em> >= 5.2.0 and <em>PHP</em> DateTimeZone acceptable time zones).
7668
</p>
7669
<p>
7670
FALSE is returned if not using a &quot;strtotime&quot; acceptable datetime string or unacceptable <em>PHP</em> time zones.
7671
If TRUE, the dateTime argument (below) is converted to the new time zone, otherwise unaltered.
7672
</p>
7673
<p>
7674
A DATE input (&lt;year&gt;&lt;month&gt;&lt;day&gt;) will be expanded to a DATETIME (&lt;year&gt;&lt;month&gt;&lt;day&gt;000000) before transform.
7675
</p>
7676
<p class="label">Format</p>
7677
<p class="format">iCalUtilityFunctions::transformDateTime( dateTime, timezoneFrom [, timezoneTo [, format ]] )</p>
7678
<p class="comment">
7679
dateTime     = (array) ( &quot;year&quot;  =&gt; (int) year            // <span class="comment">input</span>
7680
                        , &quot;month&quot; =&gt; (int) month
7681
                        , &quot;day&quot;   =&gt; (int) day
7682
                       [, &quot;hour&quot;  =&gt; (int) hour
7683
                        , &quot;min&quot;   =&gt; (int) min
7684
                        , &quot;sec&quot;   =&gt; (int) sec ] )
7685
dateTime     = (array) ( (int) year                       // <span class="comment">input</span>
7686
                        , (int) month
7687
                        , (int) day
7688
                       [, (int) hour
7689
                        , (int) min
7690
                        , (int) sec ] )
7691
dateTime     = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">input</span>
7692
dateTime     = (string) datetime string<sup>*</sup>                  // <span class="comment">input</span>
7693
dateTime     = (string) datetime string                   // <span class="comment">on successful output</span>
7694
timezoneFrom = (string) a <em>PHP</em> (DateTimeZone) valid time zone
7695
timezoneTo   = (string) a <em>PHP</em> (DateTimeZone) valid time zone, default &quot;UTC&quot;
7696
format       = (string) output format (any date formatting, default &quot;Ymd\THis&quot;)
7697
<br>datetime string<sup>*</sup> recommended formats
7698
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
7699
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
7700
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
7701
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
7702
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
7703
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
7704
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
7705
<p class="label">Example</p>
7706
<p>Convert from time zone &quot;Europe/Stockholm&quot; to &quot;UTC&quot;</p>
7707
<p class="example">&lt;?php
7708
.. .
7709
$d          = date( &quot;Y-m-d H:i:s&quot; );
7710
$tzFr       = &quot;Europe/Stockholm&quot;;
7711
if( FALSE !== iCalUtilityFunctions::transformDateTime( $d, $tzFr ))
7712
  $event-&gt;setProperty( &quot;dtstart&quot;, $d.&quot;Z&quot; );
7713
else
7714
  $event-&gt;setProperty( &quot;dtstart&quot;, $d, array( &quot;TZID&quot; => $tzFr ));
7715
.. .
7716
</p>
7717
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7718

    
7719

    
7720
<a name="mddtuf"></a><h4>4.5 Misc. date/duration/timestamp util. functions</h4>
7721
<p>
7722
iCalUtilityFunctions static date(-time)/timestamp functions.
7723
Please examine the class file for more information about arguments and output.
7724
</p>
7725
<dl>
7726
<dt>iCalUtilityFunctions::_chkDateArr( $datetime, $parno=FALSE )
7727
<dd>Returns internal date-time/date formatted (keyed) array for an input date-time/date array (keyed or unkeyed)
7728
<dt>iCalUtilityFunctions::_chkdatecfg( $theDate, & $parno, & $params )
7729
<dd>Check date(-time) and params arrays for an opt. timezone and if it is a DATE-TIME or DATE (updates $parno and (opt) $params)
7730
<dt>iCalUtilityFunctions::_date2strdate( $datetime, $parno=6 )
7731
<dd>Returns formatted output (string) for calendar component property data value type date/date-time
7732
<dt>iCalUtilityFunctions::_duration2arr( $duration )
7733
<dd>Returns internal duration formatted (keyed) array for input in array format
7734
<dt>iCalUtilityFunctions::_duration2date( $startdate, $duration )
7735
<dd>Returns a datetime (keyed) array for a startdate+duration
7736
<dt>iCalUtilityFunctions::_durationStr2arr( $duration )
7737
<dd>Returns internal duration formatted (keyed)  array for an input string (iCal) formatted duration
7738
<dt>iCalUtilityFunctions::_duration2str( $duration )
7739
<dd>Returns a formatted string for a calendar component property data value type duration
7740
<dt>iCalUtilityFunctions::_isArrayDate( $input )
7741
<dd>Returns bool TRUE if input contains a (array formatted) date/time
7742
<dt>iCalUtilityFunctions::_isArrayTimestampDate( $input )
7743
<dd>Returns bool TRUE if input array contains a timestamp date
7744
<dt>iCalUtilityFunctions::_isOffset( $input )
7745
<dd>Returns bool TRUE if input string contains (trailing) UTC/iCal offset
7746
<dt>iCalUtilityFunctions::offsetSec2His( $seconds )
7747
<dd>Returns iCal offset [-/+]hhmm[ss] (string) from UTC offset seconds
7748
<dt>iCalUtilityFunctions::_strDate2arr( & $input )
7749
<dd>Convert a date from specific string to (keyed) array format, returns TRUE on success
7750
<dt>iCalUtilityFunctions::_strdate2date( $datetime, $parno=FALSE, $wtz=null )
7751
<dd>Returns internal date-time/date formatted (keyed) array for input date-time/date in string fromat
7752
<dt>iCalUtilityFunctions::_timestamp2date( $timestamp, $parno=6, $wtz=null )
7753
<dd>Returns internal date-time/date formatted (keyed) array, based on a timestamp, default UTC or adjusted for offset/timezone
7754
<dt>iCalUtilityFunctions::_tz2offset( $tz )
7755
<dd>Returns seconds (int) from an offset, [+/-]HHmm[ss], used when correcting UTC to localtime or v.v.
7756
</dl>
7757
<br>
7758
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7759

    
7760

    
7761
<a name="helperFunctions"></a><h1>5 Helper functions</h1>
7762
<p>The helper functions extend the utility of iCalcreator.</p>
7763

    
7764
<a name="XMLhelpers"></a><h3>5.1 iCal and XML helper functions</h3>
7765
<p>
7766
The XML helper functions convert iCal into XML and parse XML into iCal.
7767
XML is defined by [RFC6321], &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;.
7768
</p>
7769
<a name="iCal2XML"></a><h4>5.1.1 iCal2XML</h4>
7770
<p>The iCal2XML function converts an iCalcreator object instance to XML.</p>
7771
<p>
7772
Requires <em>PHP</em> 5 and &quot;libxml&quot; <em>PHP</em> extension (--enable-libxml) and utilizes the SimpleXML extension.
7773
Before <em>PHP</em> 5.1.2, &quot;--enable-simplexml&quot; (at compile time) is required to enable this extension, after <em>PHP</em> 5.1.2 enabled by default.
7774
</p>
7775
<p>An rfc6321 XML string is returned.</p>
7776
<p class="label">Format</p>
7777
<p class="format">iCal2XML( iCalobj )</p>
7778
<p class="comment">iCalobj = (object) iCalcreator instance</p>
7779
<br>
7780
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7781

    
7782
<a name="XML2iCal"></a><h4>5.1.2 XML2iCal</h4>
7783
<p>
7784
The XML2iCal function, with the two entry functions: XMLstr2iCal and XMLfile2iCal, parse an XML string/file to an iCalcreator instance.
7785
The function is <b>not</b> using the <em>PHP</em> SimpleXML extension.
7786
</p>
7787
<p>
7788
On success, an iCalcreator instance is returned.
7789
</p>
7790
<p>
7791
On XML parse error, FALSE is returned.
7792
</p>
7793
<h5>XMLstr2iCal</h5>
7794
<p>
7795
The function accepts a well-formed (rfc6321) XML string as argument.
7796
</p>
7797
<p class="label">Format</p>
7798
<p class="format">XMLstr2iCal( xmlstr [, config] )</p>
7799
<p class="comment">xmlstr  = (string) rfc6321 XML
7800
config  = (array) iCalcreator config array (opt)</p>
7801
<h5>XMLfile2iCal</h5>
7802
<p>
7803
The function accepts an XML (rfc6321) local file or a remote URI, as argument.
7804
</p>
7805
<p class="label">Format</p>
7806
<p class="format">XMLfile2iCal( xmlfile [, config] )</p>
7807
<p class="comment">xmlfile = (string) rfc6321 XML file name or resource
7808
config  = (array) iCalcreator config array (opt)</p>
7809
<h5>XML2iCal</h5>
7810
<p>
7811
This function is doing the hard work in XMLstr2iCal/XMLfile2iCal functions.
7812
</p>
7813
<p class="label">Format</p>
7814
<p class="format">XML2iCal( xmlstr [, config] )</p>
7815
<p class="comment">xmlstr  = (string) rfc6321 XML
7816
config  = (array)  iCalcreator config array (opt)</p>
7817
<br>
7818

    
7819
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7820

    
7821

    
7822
<a name="vCardhelpers"></a><h3>5.2 vCard helper functions</h3>
7823
<p>
7824
The purpose of the vCard helper functions are to produce simplified vCard output.
7825
</p>
7826
<a name="iCal2vCard"></a><h4>5.2.1 iCal2vCard</h4>
7827
<p>
7828
Convert single <a href="#ATTENDEE">ATTENDEE</a>, <a href="#CONTACT">CONTACT</a> or
7829
<a href="#ORGANIZER">ORGANIZER</a> URI (in email format) to simplified vCard output or saved in vCard file.
7830
</p>
7831
<p>
7832
If argument directory is set, vCards are saved in (directory/) files, named like &lt;firstName&gt;.&lt;familyName&gt;.&quot;ext&quot;.
7833
</p>
7834
<p>
7835
Returns vCard string or TRUE if a valid directory is used as argument (and file write ok)
7836
otherwise FALSE.
7837
</p>
7838
<p class="label">Format</p>
7839
<p class="format">iCal2vCard( email [ ,version [ ,directory [ ,ext ]]] )</p>
7840
<p class="comment">
7841
email     = (string) ATTENDEE, CONTACT or ORGANIZER URI in email format
7842
version   = (string) vCard version, default &quot;2.1&quot;, opt. &quot;3.0&quot;/&quot;4.0&quot;
7843
directory = (string) if and where to save vCards files (write rights required), default FALSE
7844
ext       = (string) vCard file extension, default &quot;vcf&quot;
7845
</p>
7846
<br>
7847
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7848

    
7849
<a name="iCal2vCards"></a><h4>5.2.2 iCal2vCards</h4>
7850
<p>
7851
Collect and convert all <a href="#ATTENDEE">ATTENDEE</a>s, <a href="#CONTACT">CONTACT</a>s and
7852
<a href="#ORGANIZER">ORGANIZER</a>s (URI, in email format) to simplified vCard (string) output or
7853
saved in vCard files, using <a href="#iCal2vCard">iCal2vCard</a> function (above).
7854
</p>
7855
<p>
7856
The file name formatting and return values are described above in <a href="#iCal2vCard">iCal2vCard</a> function.
7857
</p>
7858
<p class="label">Format</p>
7859
<p class="format">iCal2vCards( vcalendar [ ,version [ ,directory [ ,ext ]]] )</p>
7860
<p class="comment">
7861
vcalendar = (object) iCalcreator object instance
7862
version   = (string) vCard version, default &quot;2.1&quot;, opt. &quot;3.0&quot;/&quot;4.0&quot;
7863
directory = (string) if and where to save vCards files (write rights required), default FALSE
7864
ext       = (string) vCard file extension, default &quot;vcf&quot;
7865
</p>
7866
<p class="comment">
7867
Return (bool) TRUE if argument directory is not null, otherwise vCard string.
7868
</p>
7869
<br>
7870
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7871

    
7872

    
7873
<a name="TZhelpers"></a><h3>5.3 time zone helper functions</h3>
7874
<p>
7875
Additional functions to use with vtimezone components.
7876
</p>
7877
<p>
7878
The <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function
7879
creates time zone transition information, based on vtimezone components contents in a iCalcreator calendar instance.
7880
</p>
7881
<p>
7882
The <a href="#getTzOffsetForDate">getTzOffsetForDate</a> function returns UTC offset information for specific date (timestamp) based on output from <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function.
7883
</p>
7884
<p>
7885
Before calling the functions <a href="#getTzOffsetForDate">getTzOffsetForDate</a> and <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a>,
7886
set time zone 'GMT' ('date_default_timezone_set')!
7887
</p>
7888

    
7889
<a name="getTzOffsetForDate"></a><h4>5.3.1 getTzOffsetForDate</h4>
7890
<p>
7891
The <a href="#getTzOffsetForDate">getTzOffsetForDate</a> function returns UTC offset information for specific date (timezone) based on output from <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function.
7892
</p>
7893
<p>
7894
Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
7895
</p>
7896
<p>
7897
Returns array, time zone data for specific date (timestamp) with keys for
7898
</p>
7899
<ul>
7900
<li>&quot;offsetHis&quot; (+/-Hi[s])
7901
<li>&quot;offsetSec&quot;( UTC offset in seconds)
7902
<li>&quot;tzname&quot; (standard/daylight time zone name)
7903
</ul>
7904
<p class="label">Format</p>
7905
<p class="format">getTzOffsetForDate( timezonesarray, tzid, timestamp )</p>
7906
<p class="comment">timezonesarray = (array)  output from getTimezonesAsDateArrays, below
7907
tzid           = (string) time zone identifier
7908
timestamp      = (mixed)  the date in question (timestamp)
7909
                          or UTC datetime (array) ( &quot;year&quot;  =&gt; (int) year
7910
                                                  , &quot;month&quot; =&gt; (int) month
7911
                                                  , &quot;day&quot;   =&gt; (int) day
7912
                                                  , &quot;hour&quot;  =&gt; (int) hour
7913
                                                  , &quot;min&quot;   =&gt; (int) min
7914
                                                  , &quot;sec&quot;   =&gt; (int) sec )</p>
7915
<br>
7916
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7917

    
7918
<a name="getTimezonesAsDateArrays"></a><h4>5.3.2 getTimezonesAsDateArrays</h4>
7919
<p>
7920
The function creates time zone transition information,
7921
based on vtimezone component contents in a iCalcreator calendar instance,
7922
using sub-function expandTimezoneDates.
7923
</p>
7924
<p>
7925
Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
7926
</p>
7927
<p>
7928
Returns an array containing time zone data from vtimezone standard/daylight instances (input to <a href="#getTzOffsetForDate">getTzOffsetForDate</a>, above).
7929
</p>
7930
<p class="label">Format</p>
7931
<p class="format">getTimezonesAsDateArrays( iCalobj )</p>
7932
<p class="comment">iCalobj= (object) iCalcreator calendar instance</p>
7933
<br>
7934
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7935

    
7936

    
7937
<a name="Copyright_and_Licence"></a><h1>6 COPYRIGHT AND LICENSE</h1>
7938

    
7939
<a name="Copyright"></a><h4>6.1 Copyright</h4>
7940
<p>
7941
iCalcreator v2.22<br>
7942
Copyright &copy; 2007-2015 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
7943
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
7944
<a href="http://kigkonsult.se/support/index.php" title="kigkonsult.se support" target="_blank">kigkonsult.se support</a><br>
7945
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
7946
</p>
7947

    
7948
<a name="Licence"></a><h4>6.2 License</h4>
7949
<p>
7950
This library is free software; you can redistribute it and/or
7951
modify it under the terms of the GNU Lesser General Public
7952
License as published by the Free Software Foundation; either
7953
version 2.1 of the License, or (at your option) any later version.
7954
</p>
7955
<p>
7956
This library is distributed in the hope that it will be useful,
7957
but WITHOUT ANY WARRANTY; without even the implied warranty of
7958
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7959
Lesser General Public License for more details.
7960
</p>
7961
<p>
7962
You should have received a copy of the GNU Lesser General Public
7963
License along with this library; if not, write to the Free Software
7964
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
7965
or download it <a href="http://kigkonsult.se/downloads/dl.php?f=LGPL" target="_blank">here</a>.
7966
</p>
7967
<br>
7968
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Copyright_and_Licence">[up]</a>
7969
</body>
7970
</html>