iCalcreator 2.2.6 |
icalobject = 1*("BEGIN" ":" "VCALENDAR" CRLF |
icalbody |
"END" ":" "VCALENDAR" CRLF) |
icalbody = calprops component |
calprops = 2*( |
'prodid' and 'version' are both REQUIRED, but MUST NOT occur more than once |
prodid / version / |
'calscale' and 'method' are optional, but MUST NOT occur more than once |
calscale / |
method / |
x-prop |
) |
component = 1*(eventc / todoc / journalc / freebusyc / timezonec / iana-comp* / x-comp*) |
iana-comp = "BEGIN" ":" iana-token CRLF |
1*contentline |
"END" ":" iana-token CRLF |
x-comp = "BEGIN" ":" x-name CRLF |
1*contentline |
"END" ":" x-name CRLF |
"BEGIN" ":" "VEVENT" CRLF |
eventprop *alarmc |
"END" ":" "VEVENT" CRLF |
eventprop = *( |
the following are optional,but MUST NOT occur more than once |
class / created / description / dtstart / |
geo / last-mod / location / organizer / priority / |
dtstamp / seq / status / summary / |
transp / uid / url / recurid / |
either 'dtend' or 'duration' may appear in a 'eventprop', |
but 'dtend' and 'duration' MUST NOT occur in the same 'eventprop' |
dtend / duration / |
the following are optional, and MAY occur more than once |
attach / attendee / categories / comment / |
contact / exdate / exrule / rstatus / |
related / resources / rdate / rrule / x-prop |
) |
"BEGIN" ":" "VTODO" CRLF |
todoprop *alarmc |
"END" ":" "VTODO" CRLF |
todoprop = *( |
the following are optional, but MUST NOT occur more than once |
class / completed / created / description / dtstamp / dtstart / |
geo / last-mod / location / organizer / percent / priority / |
recurid / seq / status / summary / uid / url / |
either 'due' or 'duration' may appear in a 'todoprop', |
but 'due' and 'duration' MUST NOT occur in the same 'todoprop' |
due / duration / |
the following are optional,and MAY occur more than once |
attach / attendee / categories / comment / |
contact / exdate / exrule / rstatus / |
related / resources / rdate / rrule / x-prop |
) |
journalc = "BEGIN" ":" "VJOURNAL" CRLF |
jourprop |
"END" ":" "VJOURNAL" CRLF |
jourprop = *( |
the following are optional, but MUST NOT occur more than once |
class / created / description / dtstart / |
dtstamp / last-mod / organizer / recurid / |
seq / status / summary / uid / url / |
the following are optional,and MAY occur more than once |
attach / attendee / categories / comment / |
contact / exdate / exrule / related / |
rdate / rrule / rstatus / x-prop |
) |
"BEGIN" ":" "VFREEBUSY" CRLF |
fbprop |
"END" ":" "VFREEBUSY" CRLF |
fbprop = *( |
the following are optional, but MUST NOT occur more than once |
contact / dtstart / dtend / duration / |
dtstamp / organizer / uid / url / |
the following are optional,and MAY occur more than once |
attendee / comment / freebusy / rstatus / x-prop |
) |
"BEGIN" ":" "VALARM" CRLF |
(audioprop / dispprop / emailprop / procprop) |
"END" ":" "VALARM" CRLF |
audioprop = 2*( |
'action' and 'trigger' are both REQUIRED, but MUST NOT occur more than once |
action / trigger / |
'duration' and 'repeat' are both optional,and MUST NOT occur more than once each, |
but if one occurs, so MUST the other |
duration / repeat / |
the following is optional, but MUST NOT occur more than once |
attach / |
the following is optional, and MAY occur more than once |
x-prop |
) |
dispprop = 3*( |
the following are all REQUIRED, but MUST NOT occur more than once |
action / description / trigger / |
'duration' and 'repeat' are both optional,and MUST NOT occur more than once each, |
but if one occurs, so MUST the other |
duration / repeat / |
the following is optional, and MAY occur more than once |
x-prop |
) |
emailprop = 5*( |
the following are all REQUIRED, but MUST NOT occur more than once |
action / description / trigger / summary |
the following is REQUIRED, and MAY occur more than once |
attendee / |
'duration' and 'repeat' are both optional, and MUST NOT occur more than once each, |
but if one occurs, so MUST the other |
duration / repeat / |
the following are optional, and MAY occur more than once |
attach / x-prop |
) |
procprop = 3*( |
the following are all REQUIRED, but MUST NOT occur more than once |
action / attach / trigger / |
'duration' and 'repeat' are both optional, and MUST NOT occur more than once each, |
but if one occurs, so MUST the other |
duration / repeat / |
'description' is optional, and MUST NOT occur more than once |
description / |
the following is optional, and MAY occur more than once |
x-prop |
) |
"BEGIN" ":" "VTIMEZONE" CRLF |
2*( |
'tzid' is required, but MUST NOT occur more than once |
tzid / |
'last-mod' and 'tzurl' are optional, but MUST NOT occur more than once |
last-mod / tzurl / |
one of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once. |
standardc / daylightc / |
the following is optional, and MAY occur more than once |
x-prop |
) |
"END" ":" "VTIMEZONE" CRLF |
standardc = "BEGIN" ":" "STANDARD" CRLF |
tzprop |
"END" ":" "STANDARD" CRLF |
daylightc = "BEGIN" ":" "DAYLIGHT" CRLF |
tzprop |
"END" ":" "DAYLIGHT" CRLF |
tzprop = 3*( |
the following are each REQUIRED, but MUST NOT occur more than once |
dtstart / tzoffsetto / tzoffsetfrom / |
the following are optional, and MAY occur more than once |
comment / rdate / rrule / tzname / x-prop |
) |
format
vcalendar()
example
$calendar = new vcalendar(); // initiate new CALENDAR
[index]format
vevent()
example
$vevent = new vevent(); // initiate EVENT
[index]format
vtodo()
example
$vtodo = new vtodo(); // initiate TODO
[index]format
vjournal()
example
$vjournal = new vjournal(); // initiate JOURNAL
[index]format
vfreebusy()
example
$vfreebusy = new vfreebusy(); // initiate FREEBUSY
[index]format
valarm()
example
$valarm = new valarm(); // initiate ALARM
[index]format
vtimezone()
example
$vtimezone = new vtimezone(); // initiate TIMEZONE
[index]format
deleteProperty( [ string PropName [, int order=1 ] )
Propname | case independent, strict rfc2445 component property names, unknown/missing Propname will be regarded as X-property. | |
order | if missing 1st/next occurence, used with multiply property occurences |
example 1
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
if( ! $v->deleteProperty( 'method' ))
echo "error when deleting property.. .
.. .
format
getProperty( [ string PropName [, int order=1 [, bool complete=FALSE ]]] )
Propname | case independent, strict rfc2445 component property names, unknown/missing Propname will be regarded as X-property. | |
order | if missing 1st/next occurence, used with multiply property occurences | |
complete | FALSE (default) | : output only property value |
TRUE | : output = array( 'value' => <value>, 'params' => <parameter array> ) |
example 1
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
$calscale = $v->getProperty( 'calscale' );
.. .
example 2
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
while( $xprop = $v->getProperty( )) { // get x-properties in order.. .
.. .
format
setProperty( string PropName, mixed Proparg_1 *[, mixed Proparg_n] )
Propname case independent, strict rfc2445 calendar property names, unknown Propname will be regarded as X-property.example
$calendar = new vcalendar(); // initiate new CALENDAR
$calendar->setProperty( 'calscale', 'GREGORIAN' );
format
getProperty( 'calscale' )
example
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
$calscale = $v->getProperty( 'calscale' );
.. .
format
setProperty( 'calscale', string value )
example
$calendar = new vcalendar(); // initiate new CALENDAR
$calendar->setProperty( 'calscale', 'GREGORIAN' );
format
getProperty( 'method' )
example
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
$method = $v->getProperty( 'method' )
.. .
format
setProperty( 'method', string value )
example
$calendar = new vcalendar(); // initiate new CALENDAR
$calendar->setProperty( 'method', 'PUBLISH' )
format
getProperty( 'version' )
example
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
$version = $v->getProperty( 'version' )
.. .
format
setProperty( 'version', string version )
example
$calendar = new vcalendar(); // initiate new CALENDAR
$calendar->setProperty( 'version', '2.0' )
format
getProperty()
getProperty( FALSE, int propOrderNo/FALSE, TRUE )
output = array | ( propertyName 1 | ||
, array | ( 'value' | => propertyData 2 ) | |
, 'params' | => params 3)) |
example 1
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
while( $xprop = $v->getProperty( )) {
.. .
example 2
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
while( $xprop = $v->getProperty( 'X-WR-TIMEZONE' )) {
.. .
example 3
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
while( $xprop = $v->getProperty( FALSE, FALSE, TRUE )) {
.. .
$xprop = array | ( propertyName 1 | ||
, array | ( 'value' | => propertyData 2 ) | |
, 'params' | => params 3 ) |
format
setProperty( propertyName, propertyData [, params ] )
propertyName 1 | = | Any property name with a "X-" prefix |
propertyData 2 | = | Value type TEXT |
params 3 | = | array( ['LANGUAGE' => '<lang>'] [, xparam] ) |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$calendar = new vcalendar(); | // initiate new CALENDAR |
$calendar->setProperty( 'X-WR-CALNAME', 'Calendar Sample' ); | // set some X-properties.. . |
$calendar->setProperty( 'X-WR-CALDESC', 'Calendar Description' ); | |
$calendar->setProperty( 'X-WR-TIMEZONE', 'Europe/Stockholm' ); |
format 1
deleteComponent( int orderNumber )
Remove component with order number (1st=1, 2nd=2.. .).
format 2
deleteComponent( string componentType [, int componentSuborderNumber])
Remove component with component type (ex. 'vevent') and order 1 alt. suborder number.
format 3
deleteComponent( string UID )
Remove component with UID. N.B UID is NOT set for alarm/timezone components.
example
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
$v->deleteComponent( 1 );
.. .
format 1
getComponent()
Get next component, until end-of-components.
format 2
getComponent( int orderNumber )
Get component with order number (1st=1, 2nd=2.. .).
format 3
getComponent( string componentType [, int componentSuborderNumber])
Get (next) component with component type (until end-of-components) alt.
Get component with component type and suborder number (1st=1, 2nd=2.. .).
format 4
getComponent( string UID )
Get component with UID as key. N.B UID is NOT set for alarm/timezone components.
example
$v = new vcalendar();
$v->setConfig( 'filename', 'file.ics' );
$v->parse();
while( $comp = $v->getComponent()) {
.. .
format 1
setComponent( component )
addComponent( component ) // alias
Insert last in component chain.
format 2
setComponent( component, int orderNumber )
Replace component with order number (1st=1, 2nd=2.. .). if orderNumber is not found, component is inserted last in chain.
format 3
setComponent( component, string componentType [, component suborder number])
Replace component with component type and 1st alt. component order number. if orderNumber is not found, component is inserted last in chain.
format 4
setComponent( component, string UID )
Replace component with UID. N.B UID is NOT set for alarm/timezone components. If UID is not found, component is inserted last in chain.
example
$calendar = new vcalendar(); | // initiate new CALENDAR | |
.. . | ||
$vevent = new vevent(); | // initiate EVENT | |
$vevent->setProperty | ( 'dtstart' | // add some event properties |
, 2006, 12, 24, 19, 30, 00 ); | ||
$vevent->setProperty(.. . | ||
.. . | ||
$calendar->setComponent ( $vevent ); | // add event to calendar | |
.. . |
format
parse( [ string filename ] )
parse example
$vcalendar = new vcalendar();
$vcalendar->setConfig( 'filename', 'file.ics' );
$vcalendar->parse();
.. .
merge example
$vcalendar = new vcalendar();
$vcalendar->setConfig( 'unique_id', 'domain.com' );
$vcalendar->setConfig( 'directory', 'import' );
$vcalendar->setConfig( 'filename', 'file1.ics' );
$vcalendar->parse();
$vcalendar->setConfig( 'filename', 'file2.ics' );
$vcalendar->parse();
$vcalendar->sort();
$vcalendar->setConfig( 'filename', 'icalmerge.ics' );
$vcalendar->setConfig( 'directory', 'export' );
$vcalendar->saveCalendar();
.. .
format
createCalendar()
example
.. .
$str = $calendar->createCalendar();
echo $str;
format
returnCalendar ( [string directory/FALSE [, string filename/FALSE [, string delimiter/FALSE ]]] )
example
.. .
$calendar->setConfig( 'directory', '/tmp' );
$calendar->setConfig( 'filename', 'calendar.ics' );
$calendar->returnCalendar();
format
saveCalendar ( string directory/FALSE [, string filename/FALSE [, string delimiter/FALSE ]] )
example
$calendar->setConfig( 'directory', '/tmp' );
$calendar->setConfig( 'filename', 'calendar.ics' );
$result = $calendar->saveCalendar();
if( !$result )
echo 'error when saving.. .
format
sort()
example
$calendar = new vcalendar();
$calendar->setConfig( 'directory', '/tmp' );
$calendar->setConfig( 'filename', 'calendar.ics' );
$calendar->parse();
$calendar->sort();
$calendar->returnCalendar();
format
useCachedCalendar( string directory/FALSE, string filename/FALSE , string delimiter/FALSE [, int timeout ] )
example
.. .
$calendar->setConfig( 'directory', '/tmp' );
$calendar->setConfig( 'filename', 'calendar.ics' );
$calendar->useCachedCalendar();
format
getConfig( 'compsinfo' )
Output | = | array | ( *compinfo ) | |||
compinfo | = | array | ( 'ordno' | => int ordno, | // order number (1st=1, 2nd=2..) | |
, 'type' | => string type | // component type (vevent, vtodo.. . | ||||
, 'uid' | => string uid | // component UID (not for alarm/timezone) | ||||
, 'props' | => array( *[ propertyName | =>Property count ] ) | // for every set property | |||
, 'sub' | => array( *compinfo )) | // if subcomponents exists, an array with info for each subcomponent |
example
$v = new vcalendar();
$v->parse( 'file.ics' );
$compsinfo = $v->getConfig( 'compsinfo' );
foreach( $compsinfo as compinfo) {
echo ' order number : '.$compinfo['ordno'];
echo ' type : '.$compinfo[type'];
echo ' UID : '.$compinfo['uid'];
foreach( $compinfo['props'] as $propertyName => $propertyCount )
echo " $propertyName = $propertyCount";
if( is_array( $compinfo['sub'] )) {
foreach( $compinfo['sub'] as $subcompinfo ) {
echo ' order number : '.$subcompinfo['ordno'];
/* .. dito if subcomponents exists .. . */
}
}
}
format
getConfig( 'delimiter' )
example
$del = $calendar->getConfig( 'delimiter' );
format
setConfig( 'delimiter', string <delimiter> )
example
$calendar->setConfig( 'delimiter', '/' );
[index]format
getConfig( 'directory' )
example
$folder = $calendar->getConfig( 'directory' );
format
setConfig( 'directory', string <directory> )
example
$calendar->setConfig( 'directory', '/tmp' );
[index]format
getConfig( 'fileinfo' )
example
$fileinfo = $calendar->getConfig( 'fileinfo' );
format
getConfig( 'filename' )
example
$filename = $calendar->getConfig( 'filename' );
format
setConfig( 'filename', string <filename> )
example
$calendar->setConfig( 'filename', 'calendar.ics' );
[index]format
getConfig( 'filesize' )
example
$filesize = $calendar->getConfig( 'filesize' );
[index]format
getConfig( 'format' )
example
$format = $calendar->getConfig( 'format' );
format
setConfig( 'format', string <format> )
example
$calendar->setConfig( 'format', 'xcal' );
[index]format
getConfig( 'language' )
example
$lang = $calendar->getConfig( 'language' );
format
setConfig( 'language', string <lang> )
example
$calendar->setConfig( 'lang', 'en' );
[index]format
getConfig( 'newlinechar' )
getConfig( 'nl' ) // alias
example
$nl = $calendar->getConfig( 'nl' );
format
setConfig( 'newlinechar', string <char> )
setConfig( 'nl', string <char> ) // alias
example
$calendar->setConfig( 'nl', "\n" );
[index]format
getConfig( 'unique_id' )
example
$id = $calendar->getConfig( 'unique_id' );
format
setConfig( 'unique_id', string <unique-Id> )
example
$calendar = new vcalendar(); // initiate new CALENDAR
$calendar->setConfig( 'unique_id', 'domain.com' );
format
validDate( date [, bool utc/FALSE ] )
date | = | int year, int month, int day [, int hour, int min, int sec, mixed tz ]] |
date | = | array( int year, int month, int day [, int hour, int min, int sec, mixed tz ]] ) |
date | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec, 'tz' => mixed tz ] ) |
date | = | array ( 'timestamp' => int timestamp [, 'tz' => mixed tz ] ) |
date | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
tz | = | timezone / offset |
offset | = | (+/-)HHmm[ss] |
utc | = | TRUE and tz = UTC offset then input local date + UTC offset sets UTC format date |
example
$c = new vcalendar ();
$today = date("M d Y H:i:s");
$UTCoffset = date( 'Z'); // offset in seconds
if( '-' == substr( $UTCoffset, 0, 1 )) {
$UTCoffset = substr( $UTCoffset, 1 );
$sign = '-';
}
else {
$sign = '+';
}
$UTCoffsetHour = $UTCoffset / 3600;
$UTCoffsetMod = $UTCoffset % 3600;
$UTCoffsetMin = $UTCoffsetMod / 60;
$UTCoffsetSec = $UTCoffsetMod % 60;
$UTCoffset = sprintf( $sign."%02d%02d%02d", $UTCoffsetHour, $UTCoffsetMin, $UTCoffsetSec );
$today .= ' '.$UTCoffset; // UTC offset in accepted format, (+/-)HHMM[SS]
$date = $c->validDate( $today );
if( FALSE == $date ) {
echo "unvalid date $today";
}
else {
$e = new vevent();
$e->setProperty( 'dtstart', $date );
.. .
Note: for properties and DATE-TIME WITH UTC TIME.
The date with UTC time, or absolute time, is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90), the UTC designator, appended to the time value. For example, the following represents January 19, 1998, at 0700 UTC:
format
deleteProperty( [ string PropName [, int order=1 ] )
Propname | case independent, strict rfc2445 component property names, unknown/missing Propname will be regarded as X-property. | |
order | if missing 1st/next occurence, used with multiply property occurences |
example 1
$v = new vcalendar();
$v->parse( 'file.ics' );
$e = $v->getComponent( 'vevent' );
while( FALSE !== $e->deleteProperty( 'comment' ))
continue; // remove all COMMENT properties
.. .
format
getProperty( string PropName [, int order=1 [, bool complete=FALSE ]] )
Propname | case independent, strict rfc2445 component property names, unknown/missing Propname will be regarded as X-property. | |
order | if missing/FALSE 1st/next occurence, otherwise with multiply occurences (1st=1, 2nd=2.. .) | |
complete | FALSE (default) | : output only property value |
TRUE | : output = array( 'value' => <value>, 'params' => <parameter array> ) |
example
$v = new vcalendar();
$v->parse( 'file.ics' );
while( $vevent = $v->getComponent( 'vevent' )) {
$dtstart = $vevent->getProperty( 'dtstart' ); // one occurence
$description = $vevent->getProperty( 'description' ); // one occurence
while( $comment = $vevent->getProperty( 'comment' )) { // MAY occur more than once
.. .
format
setProperty( string PropName, mixed Proparg_1 *[, mixed Proparg_n] )
Propname case independent, strict rfc2445 component property names, unknown Propname will be regarded as X-property.
example
$vevent = new vevent();
$vevent->setProperty( 'dtstart', array( 'year'=>2007, 'month'=>4, 'day'=>1, 'hour'=>19 ));
$vevent->setProperty( 'duration', 0, 0, 3 ));
$vevent->setProperty( 'LOCATION', 'Central Placa' );
$vevent->setProperty( 'summary', 'PHP summit' );
.. .
format
getProperty( 'Action' )
getProperty( 'Action', FALSE , TRUE )
output = array | ( 'value' => actionValue 1 |
, 'params' => xparam 2 ) |
example
$action = $valarm->getProperty( 'action' );
format
setProperty( 'Action', actionValue [, xparam ] )
actionValue 1 | = | one of "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE" |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$valarm->setProperty( 'action', 'DISPLAY' );
[index]format
getProperty( 'Attach' )
getProperty( 'ATTACH', FALSE , TRUE )
output = array | ( 'value' => attachValue 1 |
, 'params' => params 2 ) |
example
$attach = $valarm->getProperty( 'attach' );
format
setProperty( 'attach', attachValue 1 [, params ] )
attachValue 1 | = | The default value type for this property is URI. The value type (in params array) can also be set to BINARY to indicate inline binary encoded content information. | |
params 2 | = | array( | [ 'ENCODING' => 'BASE64', 'VALUE' => 'BINARY' ] |
[, 'FMTTYPE' => contentType] | |||
[, xparam] ) | |||
contentType | = | The parameter value MUST be the TEXT for either an IANA registered content type or a non-standard content type. | |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty | ( | 'attach' |
, | 'ftp://domain.com/pub/docs/agenda.doc' | |
, | array( 'FMTTYPE' => 'application/binary' )); |
format
getProperty( 'Attendee' )
getProperty( 'ATTENDEE', int propOrderNo/FALSE , TRUE )
output = array | ( 'value' => attendeeValue 1 |
, 'params' => array( params 2 )) |
example
$attendee = $valarm->getProperty( 'attendee' );
format
setProperty( 'attendee', attendeeValue [, params ] )
attendeeValue 1 | = | a calendar user address, a URI as defined by [RFC 1738] or any other IANA registered form for a URI. | |||||
params 2 | = | array( | [CUTYPE] [, MEMBER] [, ROLE] [, PARTSTAT] [, RVSP] [, DELEGATED-TO] [, DELEGATED-FROM] [, SENT-BY] [, CN] [, DIR] [, LANGUAGE] [, xparams] ) | ||||
CUTYPE | = | "CUTYPE" | => | "INDIVIDUAL" | ; | An individual, Default | |
/ "GROUP" | ; | A group of individuals | |||||
/ "RESOURCE" | ; | A physical resource | |||||
/ "ROOM" | ; | A room resource | |||||
/ "UNKNOWN" | ; | Otherwise not known | |||||
/ x-name | ; | Experimental type | |||||
/ iana-token | ; | Other IANA registered type | |||||
MEMBER | = | "MEMBER" | => | array( *[ 'single member of the group or list membership' ] ) | |||
ROLE | = | "ROLE" | => | "CHAIR" | ; | Indicates chair of the calendar entity | |
/ "REQ-PARTICIPANT" | ; | A participant whose participation is required, Default | |||||
/ "OPT-PARTICIPANT" | ; | A participant whose participation is optional | |||||
/ "NON-PARTICIPANT" | ; | A participant who is copied for information purposes only | |||||
/ x-name | ; | Experimental role | |||||
/ iana-token | ; | Other IANA role | |||||
PARTSTAT | = | "PARTSTAT" | => | "NEEDS-ACTION" | ; | Event needs action, Default | |
/ "ACCEPTED" | ; | Event accepted | |||||
/ "DECLINED" | ; | Event declined | |||||
/ "TENTATIVE" | ; | Event tentatively accepted | |||||
/ "DELEGATED" | ; | Event delegated | |||||
/ "NEEDS-ACTION" | ; | To-do needs action, Default | |||||
/ "ACCEPTED" | ; | To-do accepted | |||||
/ "DECLINED" | ; | To-do declined | |||||
/ "TENTATIVE" | ; | To-do tentatively accepted | |||||
/ "DELEGATED" | ; | To-do delegated | |||||
/ "COMPLETED" | ; | To-do completed. COMPLETED property has date/time completed. | |||||
/ "IN-PROCESS" | ; | To-do in process of being completed | |||||
/ "NEEDS-ACTION" | ; | Journal needs action, Default | |||||
/ "ACCEPTED" | ; | Journal accepted | |||||
/ "DECLINED" | ; | Journal declined | |||||
/ x-name | ; | Experimental status | |||||
/ iana-token | ; | Other IANA registered status | |||||
RSVP | = | "RSVP" | => | "TRUE" / "FALSE" Default;reply expectation | |||
DELEGATED-TO | = | "DELEGATED-TO" | => | array( *[ 'single calendar user to whom the calendar user specified by the property has delegated participation' ] ) | |||
DELEGATED-FROM | = | "DELEGATED-FROM" | => | array( *[ 'single calendar user that have delegated their participation to the calendar user specified by the property' ] ) | |||
SENT-BY | = | "SENT-BY" | => | 'single calendar user that is acting on behalf of the calendar user specified by the property' | |||
LANGUAGE | = | "LANGUAGE" | => | 'language for text values in CN parameter' | |||
CN | = | "CN" | => | 'common name to be associated with the calendar user specified by the property' | |||
DIR | = | "DIR" | => | 'reference to a directory entry associated with the calendar user specified by the property' | |||
xparam | = | *[ xparamkey | => | xparamvalue ] |
example
$vevent->setProperty | ( | 'attendee' | ||||||||||
, | 'attendee1@ical.net' | |||||||||||
$vevent->setProperty | ( | 'attendee' | ||||||||||
, | 'attendee2@ical.net' | |||||||||||
, | array | ( | 'cutype' | => | 'INDIVIDUAL' | |||||||
, | 'member' | => |
| |||||||||
, | 'role' | => | 'CHAIR' | |||||||||
, | 'PARTSTAT' | => | 'ACCEPTED' | |||||||||
, | 'RSVP' | => | 'TRUE' | |||||||||
, | 'DELEgated-to' | => |
| |||||||||
, | 'delegateD-FROM' | => |
| |||||||||
, | 'SENT-BY' | => | 'part7@ical.net' | |||||||||
, | 'LANGUAGE' | => | 'us-EN' | |||||||||
, | 'CN' | => | 'John Doe' | |||||||||
, | 'DIR' | => | 'http://www.ical.net/doc/info.doc' | |||||||||
, | 'x-agenda' | => | 'status report' // xparam | |||||||||
, | 'x-length' | => | '15 min' // xparam )); |
format
getProperty( 'CATEGORIES' )
getProperty( 'CATEGORIES', int propOrderNo/FALSE , TRUE )
output = array | ( 'value' => categoryValue 1 |
, 'params' => params 2 ) |
example
$categories = $valarm->getProperty( 'categories' );
format
setProperty( 'categories', mixed categoriesValue [, params ] )
categoriesValue | = | string categoryValue / array( *categoryValue ) |
categoryValue 1 | = | textual categories or subtypes of the calendar component, can be specified as a list of categories separated by the COMMA character |
params 2 | = | array( ['LANGUAGE' => '<lang>'][, xparam] ) |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty( 'categories', 'project_x' );
[index]format
getProperty( 'CLASS' )
getProperty( 'CLASS', FALSE , TRUE )
output = array | ( 'value' => classValue 1 |
, 'params' => xparam 2 ) |
example
$class = $valarm->getProperty( 'class' );
format
setProperty( 'class', string classvalue [, xparam ] )
classvalue 1 | = | "PUBLIC" / "PRIVATE" / "CONFIDENTIAL" / iana-token / x-name |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty( 'class', 'CONFIDENTIAL' );
[index]format
getProperty( 'COMMENT' )
getProperty( 'COMMENT', int propOrderNo/FALSE , TRUE )
output = array | ( 'value' => commentValue 1 |
, 'params' => params 2 ) |
example
$comment = $vevent->getProperty( 'comment' );
format
setProperty( 'comment', commentValue [, params ] )
commentValue 1 | = | Value type Text | |
params 2 | = | array | ( ['LANGUAGE' => '<lang>'] |
[, 'ALTREP' => '<alt.text>'] | |||
[, xparam] ) | |||
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty( 'comment', 'this is a comment' );
[index]format
getProperty( 'COMPLETED' )
getProperty( 'COMPLETED', FALSE , TRUE )
output = array | ( 'value' => completedDate 1 |
, 'params' => xparam 2 ) |
example
$completed = $vtodo->getProperty( 'completed' );
format
setProperty( 'completed', mixed completedDate [, xparam ] )
completedDate | : | Always UTC format! |
completedDate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec] ) |
completedDate | = | int year, int month, int day [, int hour, int min, int sec] |
completedDate | = | array( int year, int month, int day [, int hour, int min, int sec] ) |
completedDate | = | array ( 'timestamp' => int timestamp ) |
completedDate | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example 1
$vtodo->setProperty( 'completed', 2006, 8, 10 ); // 10 august 2006 UTC
example 2
$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. .
$date = array('year' => 2006, 'month' => 10, 'day' => 10, 'tz' => '+0200');
$date = $vcalendar->validDate( $date, TRUE );
// local date + UTC offset sets UTC format date
$vtodo->setProperty( 'completed', $date );
.. .
format
getProperty( 'CONTACT' )
getProperty( 'CONTACT', int propOrderNo/FALSE , TRUE )
output = array | ( 'value' => contactValue 1 |
, 'params' => params 2 ) |
example
$contact = $vevent->getProperty( 'contact' );
format
setproperty( 'contact', contactValue [, params] )
contactValue 1 | = | Value type TEXT | |
params 2 | = | array | ( ['LANGUAGE' => '<lang>'] |
[, 'ALTREP' => '<alt.text>'] | |||
[, xparam] ) | |||
xparam | = | *[ xparamkey => xparamvalue ] |
example
$c->setProperty( 'contact', 'tel 012-34 56 789' )
[index]format
getProperty( 'CREATED' )
getProperty( 'CREATED', FALSE , TRUE )
output = array | ( 'value' => createdDate 1 |
, 'params' => xparam 2 ) |
example
$created = $vevent->getProperty( 'CREATED' );
format
setProperty( 'created', [ createdDate [, xparam ]] )
createdDate | : | Always UTC format! |
createdDate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec ) |
createdDate | = | int year, int month, int day [, int hour, int min, int sec ]] |
createdDate | = | array( int year, int month, int day [, int hour, int min, int sec] ) |
createdDate | = | array ( 'timestamp' => int timestamp ) |
createdDate | = | string datestring, // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example 1
$vevent->setProperty( 'created', 2006, 8, 11, 14, 30, 35 );
// 11 august 2006 14.30.35 UTC
example 2
$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. .
$date = array('year' => 2006, 'month' => 10, 'day' => 10, 'tz' => '+0200');
$date = $vcalendar->validDate( $date, TRUE );
// local date + UTC offset sets UTC format date
$vtodo->setProperty( 'created', $date );
.. .
example 3
$vevent->setProperty( 'created' );
// current UTC date-time is set if called without parameters
format
getProperty( 'DESCRIPTION' )
getProperty( 'DESCRIPTION', FALSE , TRUE )
output = array | ( 'value' => descriptionValue 1 |
, 'params' => params 2 ) |
example
$description = $vevent->getProperty( 'description' );
format
setProperty( 'description', descriptionValue [, params ] )
descriptionValue 1 | = | Value type TEXT | |
params 2 | = | array | ( ['LANGUAGE' => '<lang>'] |
[, 'ALTREP' => '<alt.text>'] | |||
[, xparam] ) | |||
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty( 'description', 'This is a description' );
[index]format
getProperty( 'DTEND' )
getProperty( 'DTEND', FALSE , TRUE )
output = array | ( 'value' => dtendDate 1 |
, 'params' => params 2 ) |
example
$dtend = $vevent->getProperty( 'dtend' );
format
setProperty( 'dtend', dtendDate [, params ] )
dtendDate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec [, 'tz' => mixed tz ]] ) |
dtendDate | = | int year, int month, int day [, int hour, int min, int sec[, mixed tz ]] |
dtendDate | = | array( int year, int month, int day [, int hour, int min, int sec[, mixed tz ]] ) |
dtendDate | = | array ( 'timestamp' => int timestamp [, 'tz' => mixed tz ] ) |
dtendDate | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
dtendDate | : | Within the "VFREEBUSY" calendar component, the time MUST be specified in the UTC time format. |
tz | = | timezone / UTC offset |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
params 2 | = | array( [ tzidparam / datetimeparam / dateparam ] *[, xparams ] ) |
tzidparam | = | timezone identifier // date output as local date-time with timezone identifier |
datetimeparam | = | "VALUE" => "DATE-TIME" // date output as date-time |
dateparam | = | "VALUE" => "DATE" // date output as date |
xparams | = | xparamkey => xparamvalue |
example 1
$vevent->setProperty | ( | 'dtend' |
, | 2006, 8, 11, 16, 30, 0 ); | |
// 11 august 2006 16.30.00 local date |
example 2
$vfreebusy->setProperty | ( | 'dtend' |
, | 2006, 8, 11, 16, 30, 0, '-040000' ); | |
// 11 august 2006 16.30.00 -040000 : local date + UTC offset sets UTC format date |
format
getProperty( 'DTSTAMP' )
getProperty( 'DTSTAMP', FALSE , TRUE )
output = array | ( 'value' => dtstampDate 1 |
, 'params' => xparam 2 ) |
example
$dtstamp = $vevent->getProperty( 'dtstamp' );
format
setProperty( 'dtstamp', dtstampDate [, xparam ] )
dtstampDate | : | MUST be specified in the UTC time format. |
dtstampDate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec] ) |
dtstampDate | = | int year, int month, int day [, int hour, int min, int sec] |
dtstampDate | = | array( int year, int month, int day [, int hour, int min, int sec] ) |
dtstampDate | = | array ( 'timestamp' => int timestamp ) |
dtstampDate | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example 1
$vevent->setProperty | ( | 'dstamp' |
, | 2006, 8, 11, 7, 30, 1 ); | |
// 11 august 2006 07.30.01 UTC |
example 2
$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. .
$date = array('year' => 2006, 'month' => 10, 'day' => 10, 'tz' => '+0200');
$date = $vcalendar->validDate( $date, TRUE );
// local date + UTC offset sets UTC format date
$vtodo->setProperty( 'dtstamp', $date );
.. .
format
getProperty( 'DTSTART' )
getProperty( 'DTSTART', FALSE , TRUE )
output = array | ( 'value' => dtstartDate 1 |
, 'params' => params 2 ) |
example
$dtstart = $vevent->getProperty( 'dtstart' );
format
setProperty( 'dtstart', mixed dtstartDate [, params ] )
dtstartDate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec[, 'tz' => mixed tz ]] ) |
dtstartDate | = | int year, int month, int day [, int hour, int min, int sec[, mixed tz ]] |
dtstartDate | = | array( int year, int month, int day [, int hour, int min, int sec[, mixed tz ]] ) |
dtstartDate | = | array ( 'timestamp' => int timestamp [, 'tz' => mixed tz ] ) |
dtstartDate | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
dtstartDate | : | Within the "VFREEBUSY" calendar component, the time MUST be specified in the UTC time format. |
tz | = | timezone / offset |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
params 2 | = | array( [ tzidparam / datetimeparam / dateparam ] *[, xparams ] ) |
tzidparam | = | timezone identifier // date output as local date-time with timezone identifier |
datetimeparam | = | "VALUE" => "DATE-TIME" // date output as date-time |
dateparam | = | "VALUE" => "DATE" // date output as date |
xparams | = | xparamkey => xparamvalue |
example 1
$vevent->setProperty | ( | 'dstart' |
, | 2006, 8, 11, 7, 30, 1 ); | |
// 11 august 2006 07.30.01 local date |
example 2
$vevent->setProperty | ( | 'dstart' |
, | 2006, 8, 11, 16, 30, 0, '-040000' ); | |
// 11 august 2006 16.30.00 -040000 : local date + UTC offset sets UTC format date |
format
getProperty( 'DUE' )
getProperty( 'DUE', FALSE , TRUE )
output = array | ( 'value' => dueDate 1 |
, 'params' => params 2 ) |
example
$due = $vtodo->getProperty( 'due' );
format
setProperty( 'due', mixed dueDate [, params ] )
dueDate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec[, 'tz' => mixed tz ]] ) |
dueDate | = | int year, int month, int day [, int hour, int min, int sec[, mixed tz ]] |
dueDate | = | array( int year, int month, int day [, int hour, int min, int sec[, mixed tz ]] ) |
dueDate | = | array ( 'timestamp' => int timestamp [, 'tz' => mixed tz ] ) |
dueDate | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
tz | = | timezone / offset |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
params 2 | = | array( [ tzidparam / datetimeparam / dateparam ] *[, xparams ] ) |
tzidparam | = | timezone identifier // date output as local date-time with timezone identifier |
datetimeparam | = | "VALUE" => "DATE-TIME" // date output as date-time |
dateparam | = | "VALUE" => "DATE" // date output as date |
xparams | = | xparamkey => xparamvalue |
example 1
$vtodo->setProperty | ( | 'due' |
, | 2006, 8, 11, 18, 0, 0 ); | |
// 11 august 2005 18.00.00 local date |
example 2
$vtodo->setProperty | ( | 'due' |
, | 2006, 8, 11, 16, 30, 0, '-040000' ); | |
// 11 august 2006 16.30.00 -040000 : local date + UTC offset sets UTC format date |
format
getProperty( 'DURATION' )
getProperty( 'DURATION', FALSE , TRUE )
output = array | ( 'value' => duration 1 |
, 'params' => xparam 2 ) |
example
$duration = $vtodo->getProperty( 'duration' );
option
format
setProperty( 'duration', mixed duration [, xparam ] )
duration 1 | = | array ( 'week' => int week/false [, 'day' => int day/false [, 'hour' => int hour/false, 'min' => int min/false, 'sec' => int sec/false ]] ); |
duration | = | array ( 'week' => int week ); |
duration | = | array ( 'day' => int week ); |
duration | = | array ( 'hour' => int hour, 'min' => int min, 'sec' => int sec ); |
duration | = | array ( 'sec' => int sec ); |
duration | = | int week/false [, int day/false [, int hour, int min, int sec]] |
duration | = | array( int week/false [, int day/false [, int hour, int min, int sec]] ) |
duration | = | string dur-value = ["+"] "P" (dur-date / dur-time / dur-week) |
dur-date | = | dur-day [dur-time] |
dur-time | = | "T" (dur-hour / dur-minute / dur-second) |
dur-week | = | 1*DIGIT "W" |
dur-hour | = | 1*DIGIT "H" [dur-minute] |
dur-minute | = | 1*DIGIT "M" [dur-second] |
dur-second | = | 1*DIGIT "S" |
dur-day | = | 1*DIGIT "D" |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example 1
$vtodo->setProperty | ( | 'duration |
, | array( 'day' => 1 )); // one day |
example 2
$vtodo->setProperty | ( | 'duration |
, | 'PT4H' ); // four hours |
format
getProperty( 'EXDATE' )
getProperty( 'exdate', int propOrderNo/FALSE, TRUE )
output = array | ( 'value' => exdates 1 |
, 'params' => params 2 ) |
example
$exdate = $vtodo->getProperty( 'exdate' );
format
setProperty( 'exdate', exdates [, params ] )
exdates 1 | = | array ( date *[, date ] ) |
date | = | array( int year, int month, int day [, int hour, int min, int sec, mixed tz ]] ) |
date 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec [, 'tz => mixed tz ]] ) |
date | = | array ( 'timestamp' => int timestamp [, 'tz' => mixed tz ] ) |
date | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
tz | = | timezone / offset |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
params 2 | = | array( [ ( datetimeparam/ dateparam ) / tzidparam ] [, xparam] ) |
datetimeparam | = | "VALUE" => "DATE-TIME" // date output as date-time |
dateparam | = | "VALUE" => "DATE" // date output as date |
tzidparam | = | "TZID" => text |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty | ( | 'exdate' |
, | array( 2006, 8, 14, 16, 0, 0 )); | |
// 14 august 2006 16.00.00 local date |
format
getProperty( 'EXRULE' )
getProperty( 'exrule', int propOrderNo/FALSE, TRUE )
output = array | ( 'value' => recur 1 |
, 'params' => xparam 2 ) |
example
$exrule = $vtodo->getProperty( 'exrule' );
format
setProperty( 'exrule', recur [, xparam ] )
format
See rules in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in text and HTML format.
recur 1 | = | array | ( "FREQ"=>freq | |||
either UNTIL or COUNT may appear in a 'recur', | ||||||
but UNTIL and COUNT MUST NOT occur in the same 'recur' | ||||||
[ | , "UNTIL" | "=>" | enddate ] | |||
[ | , "COUNT" | "=>" | 1*DIGIT ] | |||
the rest of these keywords are optional, | ||||||
but MUST NOT occur more than once | ||||||
[ | , "INTERVAL" | "=>" | 1*DIGIT ] | |||
[ | , "BYSECOND" | "=>" | byseclist ] | |||
[ | , "BYMINUTE" | "=>" | byminlist ] | |||
[ | , "BYHOUR" | "=>" | byhrlist ] | |||
[ | , "BYDAY" | "=>" | bywdaylist ] | |||
[ | , "BYMONTHDAY" | "=>" | bymodaylist ] | |||
[ | , "BYYEARDAY" | "=>" | byyrdaylist ] | |||
[ | , "BYWEEKNO" | "=>" | bywknolist ] | |||
[ | , "BYMONTH" | "=>" | bymolist ] | |||
[ | , "BYSETPOS" | "=>" | bysplist ] | |||
[ | , "WKST" | "=>" | weekday ] | |||
[ | , x-name | "=>" | text ] | |||
) |
freq | = | "SECONDLY" / "MINUTELY" / "HOURLY" / "DAILY" / "WEEKLY" / "MONTHLY" / "YEARLY" | |
enddate | = | date | |
enddate | = | / date-time | ;An UTC value |
byseclist | = | seconds | |
byseclist | = | array (seconds / ( seconds *("," seconds) )) | |
seconds | = | 1DIGIT / 2DIGIT | ;0 to 59 |
byminlist | = | minutes | |
byminlist | = | array( minutes / ( minutes *("," minutes) )) | |
minutes | = | 1DIGIT / 2DIGIT | ;0 to 59 |
byhrlist | = | hour | |
byhrlist | = | array( hour / ( hour *("," hour) )) | |
hour | = | 1DIGIT / 2DIGIT | ;0 to 23 |
bywdaylist | = | weekdaynum | |
bywdaylist | = | array( weekdaynum / ( weekdaynum *("," weekdaynum) )) | |
weekdaynum | = | [([plus] ordwk / minus ordwk)] weekday | |
plus | = | "+" | |
minus | = | "-" | |
ordwk | = | 1DIGIT / 2DIGIT | ;1 to 53 |
weekday | = | "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA" | |
;Corresponding to SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, | |||
;FRIDAY, SATURDAY and SUNDAY days of the week. | |||
bymodaylist | = | monthdaynum | |
bymodaylist | = | aray( monthdaynum / ( monthdaynum *("," monthdaynum) )) | |
monthdaynum | = | ([plus] ordmoday) / (minus ordmoday) | |
ordmoday | = | 1DIGIT / 2DIGIT | ;1 to 31 |
byyrdaylist | = | yeardaynum | |
byyrdaylist | = | array( yeardaynum / ( yeardaynum *("," yeardaynum) )) | |
yeardaynum | = | ([plus] ordyrday) / (minus ordyrday) | |
ordyrday | = | 1DIGIT / 2DIGIT / 3DIGIT | ;1 to 366 |
bywknolist | = | weeknum | |
bywknolist | = | array( weeknum / ( weeknum *("," weeknum) )) | |
weeknum | = | ([plus] ordwk) / (minus ordwk) | |
bymolist | = | monthnum | |
bymolist | = | array( monthnum / ( monthnum *("," monthnum) )) | |
monthnum | = | 1DIGIT / 2DIGIT | ;1 to 12 |
bysplist | = | setposday | |
bysplist | = | array( setposday / ( setposday *("," setposday) )) | |
setposday | = | yeardaynum |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty | ( 'Exrule' | |||||||||||||
, array | ( | 'FREQ' | => | "MONTHLY" | ||||||||||
', | UNTIL' | => | '20060831' | // date / date-time in UTC format; string/array, see CREATED format | ||||||||||
, | 'INTERVAL' | => | 2 | |||||||||||
, | 'WKST' | => | 'SU' | |||||||||||
, | 'BYSECOND' | => | 2 | |||||||||||
, | 'BYMINUTE' | => | array( 2, -4, 6 ) | // single value/array of values | ||||||||||
, | 'BYHOUR' | => | array( 2, 4, -6 ) | // single value/array of values | ||||||||||
, | 'BYMONTHDAY' | => | -2 | // single value/array of values | ||||||||||
, | 'BYYEARDAY' | => | 2 | // single value/array of values | ||||||||||
, | 'BYWEEKNO' | => | array( 2, -4, 6 ) | // single value/array of values | ||||||||||
, | 'BYMONTH' | => | 2 | // single value/array of values | ||||||||||
, | 'BYSETPOS' | => | array( 2, -4, 6 ) | // single value/array of values | ||||||||||
, | 'BYday' | => | array
| // array of value arrays // (or single value array) | ||||||||||
, | 'X-NAME' | => | 'x-value' ) | |||||||||||
, array | ( 'xparamkey' | => | 'xparamValue' )) | |||||||||||
$vtodo->setProperty( | 'exrule' | |||||||||||||
, array | ( | 'FREQ' | => | "WEEKLY" | ||||||||||
, | 'COUNT' | => | 2 | |||||||||||
, | 'INTERVAL' | => | 2 | |||||||||||
, | 'WKST' | => | 'SU' | |||||||||||
, | 'BYSECOND' | => | array( -2, 4, 6 ) | // single value/array of values | ||||||||||
, | 'BYMINUTE' | => | -2 | // single value/array of values | ||||||||||
, | 'BYHOUR' | => | 2 | // single value/array of values | ||||||||||
, | 'BYMONTHDAY' | => | array( 2, -4, 6 ) | // single value/array of values | ||||||||||
, | 'BYYEARDAY' | => | array( -2, 4, 6 ) | // single value/array of values | ||||||||||
, | 'BYWEEKNO' | => | -2 | // single value/array of values | ||||||||||
, | 'BYMONTH' | => | array( 2, 4, -6 ) | // single value/array of values | ||||||||||
, | 'BYSETPOS' | => | -2 | // single value/array of values | ||||||||||
, | 'BYday' | => | array(5,'DAY'=>'WE') | // single value array | ||||||||||
// (or array of value arrays) | ||||||||||||||
, | 'X-NAME' | => | 'x-value' | )); |
format
getProperty( 'FREEBUSY' )
getProperty( 'FREEBUSY', int propOrderNo/FALSE , TRUE )
output = array | ( 'value' => array('fbtype' => freebusytype 1 *[,dateperiods 2]) |
, 'params' => xparam 3 ) |
example
$freebusy = $vfreebusy->getProperty( 'FREEBUSY' );
format
setProperty( 'freebusy', freebusytype, dateperiods [, xparam ] )
freebusytype 1 | = | one of "FREE" / "BUSY" Default / "BUSY-UNAVAILABLE" / "BUSY-TENTATIVE" / x-name |
dateperiods 2 | = | array( array( startdate, enddate/duration ) *[, array( startdate, enddate/duration ) ] ) |
startdate enddate | = | array( int year, int month, int day, int int hour, int min, int day [, string offset ] ) |
startdate enddate | = | array ( 'year' => int year, 'month' => int month, 'day' => int day, 'hour' => int hour, 'min' => int min, 'sec' => int sec [, 'tz' => string offset ] ) // output format |
startdate enddate | = | array ( 'timestamp' => int timestamp [, 'tz' => string offset ] ) |
startdate enddate | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
startdate enddate | : | date and time values MUST be in an UTC time format or local date + UTC offset. |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
duration | = | array( int week/false [, int day/false, int hour, int min, int sec] ) |
duration | = | array ( 'week' => int week/false [, 'day' => int day/false [, 'hour' => int hour, 'min' => int min, 'sec' => int sec ]] ); // output format |
duration | = | array ( 'week' => int week ); |
duration | = | array ( 'day' => int day ); |
duration | = | array ( 'hour' => int hour, 'min' => int min, 'sec' => int sec ); |
duration | = | array ( 'sec' => int sec ); |
duration | = | string dur-value = (["+"] / "-") "P" (dur-date / dur-time / dur-week) |
dur-date | = | dur-day [dur-time] |
dur-time | = | "T" (dur-hour / dur-minute / dur-second) |
dur-week | = | 1*DIGIT "W" |
dur-hour | = | 1*DIGIT "H" [dur-minute] |
dur-minute | = | 1*DIGIT "M" [dur-second] |
dur-second | = | 1*DIGIT "S" |
dur-day | = | 1*DIGIT "D" |
xparam 3 | = | array( *[ xparamkey => xparamvalue ] ) |
example
See rules in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in text and HTML format.
$fdate1 = array ( 2001, 1, 1, 1, 1, 1 );
alt.
$fdate1 = array ( 'year' => 2001, 'month' => 1, 'day' => 1, 'hour' => 1, 'min' => 1, 'sec' => 1 );
$fdate2 = array ( 2002, 2, 2, 2, 2, 2 );
$fdate3 = array ( 2003, 3, 3, 3, 3, 3 );
$fdate4 = '4 April 2005 4:4:4';
$fdate7 = array ( 'year' => 2007, 'month' => 7, 'day' => 7 );
$fdur6 = array ( 'week' => 0, 'day' => 5, 'hour' => 5, 'min' => 5, 'sec' => 5 );
$fdur7 = array ( 0, 0, 6 ); // duration for 6 hours
$fdur8 = 'P2D'; // duration two days
$freebusy->setProperty | ( | 'freebusy' | ||
, | 'FREE | |||
, | array | ( | array( $fdate1, $fdate2 ) | |
, | array( $fdate3, $fdur6 ) | |||
, | array( $fdate4, $fdate5 ))); | |||
$freebusy->setProperty | ( | 'freebusy' | ||
, | 'Busy' | |||
, | array | ( | array( array( $fdate1, $fdate2 ) | |
, | array( $fdate3, $fdur8 ) | |||
, | array( $fdate4, $fdur7 ) | |||
, | array( $fdate1, $fdate3 ))); |
format
getProperty( 'GEO' )
output = array | ( 'latitude' => <latitude> |
, 'longitude' => <longitude>)) |
getProperty( 'GEO', FALSE , TRUE )
output = array | ( 'value' => array | ( 'latitude' => <latitude> |
, 'longitude' => <longitude>)) | ||
, 'params' => xparam 1 ) |
example
$geo = $vevent->getProperty( 'GEO' );
format
setProperty( 'geo', float latitude, float longitude [, xparam ] )
xparam 1 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty( 'geo', 11.23456, -23.45678 );
[index]format
getProperty( 'LAST-MODIFIED' )
getProperty( 'LAST-MODIFIED', FALSE , TRUE )
output = array | ( 'value' => moddate 1 |
, 'params' => xparam 2 ) |
example
$last-mod = $vevent->getProperty( 'LAST-MODIFIED' );
format
setProperty( 'Last-Modified' [, moddate [, xparam ]] )
moddate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec ] ) |
moddate | = | int year, int month, int day [, int hour, int min, int sec ] |
moddate | = | array( int year, int month, int day [, int hour, int min, int sec ] ) |
moddate | = | array ( 'timestamp' => int timestamp ) |
moddate | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example 1
$vevent->setProperty | ( | 'last-modified' |
, | 2006, 8, 14, 12, 1, 2 ); | |
// 14 august 2006 12.01.02 UTC |
example 2
$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. .
$date = array('year' => 2006, 'month' => 10, 'day' => 10, 'tz' => '+0200');
$date = $vcalendar->validDate( $date, TRUE ); // local date + UTC offset sets UTC format date
$vtodo->setProperty( 'last-modified', $date );
.. .
example 3
$vevent->setProperty( 'last-modified' );
// current UTC date-time is set if called without parameters
format
getProperty( 'LOCATION' )
getProperty( 'LOCATION', FALSE , TRUE )
output = array | ( 'value' => location 1 |
, 'params' => param 2 ) |
example
$location = $vevent->getProperty( 'LOCATION' );
format
setProperty( 'location', string location [, array param] )
location 1 | = | Value type TEXT | |
params 2 | = | array( | ['LANGUAGE' => '<lang>'] |
[, 'ALTREP' => '<alt.text>'] | |||
[, xparam] | |||
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty( 'location', 'Buckingham Palace' );
[index]format
getProperty( 'ORGANIZER' )
getProperty( 'ORGANIZER', FALSE , TRUE )
output = array | ( 'value' => organizer 1 |
, 'params' => params 2 ) |
example
$organizer = $vevent->getProperty( 'ORGANIZER' );
format
setProperty( 'organizer', organizer [, params] )
organizer 1 | = | a calendar user address, a URI as defined by [RFC 1738] or any other IANA registered form for a URI. | |
params 2 | = | array( | ['LANGUAGE' => '<lang>' (applies to the CN parameter value) ] |
[, 'CN' => 'common name to be associated with the calendar user specified by the property'] | |||
[, 'DIR' => 'reference to a directory entry associated with the calendar user specified by the property' ] | |||
[, 'SENT-BY' => 'single calendar user that is acting on behalf of the calendar user specified by the property' ] | |||
[, xparam ] | |||
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty | ( 'organizer' | ||||
, | 'ical@domain.com' | ||||
, | array( | 'CN' | => | 'John Doe' | |
, | 'DIR' | => | 'ldap://host.com:6666/o=3DDC%20Associates,c=3DUS??(cn=3DJohn%20Smith)' | ||
, | 'SENT-BY' | => | 'secretary@domain.com' | ||
, | 'x-Key1' | => | 'x-Value' | ||
, | 'x-Key2' | => | 'y-Value' )); |
format
getProperty( 'PERCENT-COMPLETE' )
getProperty( 'PRIORITY', FALSE , TRUE )
output = array | ( 'value' => percent 1 |
, 'params' => xparam 2 ) |
example
$percent = $vtodo->getProperty( 'PERCENT-COMPLETE' );
format
setProperty( 'Percent-Complete', percent [, xparam ] )
percent 1 | = | Value type INTEGER |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vtodo->setProperty( 'percent-complete', 90 );
[index]format
getProperty( 'PRIORITY' )
getProperty( 'PRIORITY', FALSE , TRUE )
output = array | ( 'value' => priority 1 |
, 'params' => xparam 2 ) |
example
$priority = $vevent->getProperty( 'priority' );
format
setProperty( 'priority', priority [, xparam ] )
priority 1 | = | Value type INTEGER |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty( 'priority', 3 );
[index]format
getProperty( 'RDATE' )
getProperty( 'RDATE', int propOrderNo/FALSE , TRUE )
output = array | ( 'value' => dates 1 |
, 'params' => params 2 ) |
example
$rdates = $vevent->getProperty( 'RDATE' );
format
setProperty( 'rdate', dates [, params ] )
dates 1 | = | array ( date2 *[, date2 ] ) |
date2 | = | date |
date2 | = | array( startdate, enddate/duration ) ] |
startdate | = | date |
enddate | = | date |
date | = | array( int year, int month, int day [, int int hour, int min, int day, mixed tz ] ) |
date | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec [, 'tz => mixed tz ]] ) // output format |
date | = | array ( 'timestamp' => int timestamp [, 'tz' => mixed tz ] ) |
date | = | string datestring // date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
tz | = | timezone / offset |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
duration | = | array( int week/false [, int day/false, int hour, int min, int sec] ) |
duration | = | array ( 'week' => int week/false [, 'day' => int day/false [, 'hour' => int hour, 'min' => int min, 'sec' => int sec ]] ); // output format |
duration | = | array ( 'week' => int week ); |
duration | = | array ( 'day' => int week ); |
duration | = | array ( 'hour' => int hour, 'min' => int min, 'sec' => int sec ); |
duration | = | array ( 'sec' => int sec ); |
params 2 | = | array( [ ( tzidparam / datetimeparam / dateparam ) / periodparam ] *[, xparams ] ) |
tzidparam | = | timezone identifier // date output as local date-time with timezone identifier |
datetimeparam | = | "VALUE" => "DATE-TIME" // date output as date-time |
dateparam | = | "VALUE" => "DATE" // date output as date |
periodparam | = | "VALUE" => "PERIOD" // date output as period |
xparams | = | xparamkey => xparamvalue |
example
See rules in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in text and HTML format.
// $rdate1 = array ( 2001, 1, 1, 1, 1, 1 );
// alt.
$rdate1 = array ( 'year' => 2001, 'month' => 1, 'day' => 1, 'hour' => 1, 'min' => 1, 'sec' => 1, 'tz' => 'GMT' );
$rdate2 = array ( 2002, 2, 2, 2, 2, 2, 'GMT' );
$rdate3 = '3 March 2003 03.03.03';
$rdate4 = array ( 2004, 4, 4, 4, 4, 4, 'GMT' );
$rdate5 = array ( 2005, 10, 5, 5, 5, 5 );
$rdur6 = array ( 'week' => 0, 'day' => 0, 'hour' => 5, 'min' => 5, 'sec' => 5 );
$rdur7 = array ( 0, 0, 6 );
// duration for 6 hours
$rdate8 = array ( 'year' => 2007, 'month' => 7, 'day' => 7 );
$vevent = new vevent(); | ||||
$vevent->setProperty( 'rdate', | array( $rdate1 )); | |||
// one recurrence date, date in 7-params format | ||||
$vevent->setProperty( 'rdate', | array( | $rdate1, $rdate2 )); | ||
// two dates, date 7-params format | ||||
$vevent->setProperty( 'rdate', | array( | array | ( | $rdate1, $rdate5 ) |
// Both fromdate and tomdate must have 7 params !!! | ||||
, | array( $rdate2, $rdur6 ) | |||
// duration | ||||
, | array( $rdate3, $rdur7 ) | |||
// period, pairs of fromdate <-> tom -date/-duration | ||||
, | array( $rdate4, $rdate5 ) | |||
)); |
format
getProperty( 'RECURRENCE-ID' )
getProperty( 'RECURRENCE-ID', FALSE , TRUE )
output = array | ( 'value' => recurrIdDate 1 |
, 'params' => params 2 ) |
example
$recurrDate = $vtodo->getProperty( 'RECURRENCE-ID' );
format
setProperty( 'recurrence-id', recurrIdDate [, params ] )
recurrIdDate 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec [, 'tz' => mixed tz ]] ) |
recurrIdDate | = | int year, int month, int day [, int hour, int min, int sec [, mixed tz ]] |
recurrIdDate | = | array( int year, int month, int day [, int hour, int min, int sec [, mixed tz ]] ) |
recurrIdDate | = | array ( 'timestamp' => int timestamp [, 'tz' => mixed tz ] ) |
recurrIdDate | = | string datestring // date in a string, acceptable by strtotime-command, ex. ̈́'14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
tz | = | timezone / offset |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
params 2 | = | array( [ datetimeparam / dateparam ][, rangeparam ][, xparam ] ) |
datetimeparam | = | "VALUE" => "DATE-TIME" // date output as date-time |
dateparam | = | "VALUE" => "DATE" // date output as date |
rangeparam | = | "RANGE" => ( "THISANDPRIOR" / "THISANDFUTURE" ) // range parameter |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vtodo->setProperty( 'recurrence-id', '3 March 2003 03.03.03' );
[index]format
getProperty( 'RELATED-TO' )
getProperty( 'RELATED-TO', int propOrderNo/FALSE , TRUE )
output = array | ( 'value' => relid 1 |
, 'params' => params 2 ) |
example
$relatedId = $vtodo->getProperty( 'RELATED-TO' );
format
setProperty( 'Related-To', relid [, params ] )
relid 1 | = | Value type TEXT. |
params 2 | = | array( [ reltype ] [, xparam] ) |
reltype | = | 'RELTYPE' => ('PARENT' (Default) / 'CHILD' / 'SIBLING' / iana-token / x-name) |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vtodo->setProperty( 'related-to', '19960401-080045-4000F192713@host.com');
[index]format
getProperty( 'REPEAT' )
getProperty( 'REPEAT', FALSE , TRUE )
output = array | ( 'value' => repeatTimes 1 |
, 'params' => xparam 2 ) |
example
$repeat = $vtodo->getProperty( 'REPEAT' );
format
setProperty( 'repeat', repeatTimes [, xparam ] )
repeatTimes 1 | => | Value type INTEGER |
xparam 2 | => | array( *[ xparamkey => xparamvalue ] ) |
example
$valarm->setProperty( 'repeat', 2 );
[index]format
getProperty( 'REQUEST-STATUS' )
output = array | ( | 'statcode' => statcode 1 |
, | 'text' => errtext 2 | |
[ | , | 'extdata' => extraData 3 ] ) |
getProperty( 'REQUEST-STATUS', int propOrderNo/FALSE, TRUE )
output = array | ( 'value' => | array | ( | 'statcode' => statcode 1 |
, | 'text' => errtext 2 | |||
[ | , | 'extdata' => extraData 3 ] ) | ||
, 'params' => params 4 ) |
example
$requestStatus = $vtodo->getProperty( 'REQUEST-STATUS' );
format
setProperty | ( 'Request-Status' |
, statcode, errtext [, extraData/FALSE [, params ]] ) |
statcode 1 | = | Hierarchical, numeric return status code (1*DIGIT *("." 1*DIGIT)) |
errtext 2 | = | Textual status description |
extraData 3 | = | Textual exception data. For example, the offending property name and value or complete property line. |
params 4 | = | array( ['LANGUAGE' => '<lang>'] [, xparam ] ) |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vfreebusy->setProperty | ('request-status' |
, 2.00 | |
, 'Invalid property value' | |
, 'DTSTART:96-Apr-31'); |
format
getProperty( 'RESOURCES' )
getProperty( 'RESOURCES', int propOrderNo/FALSE, TRUE )
output = array | ( 'value' => resources 1 |
, 'params' => params 2 ) |
example
$resources = $vtodo->getProperty( 'RESOURCES' );
format
setProperty( 'resources', resources [, params ] )
resources 1 | = | string resourceParts (commaseparated list if more than one ) | |
resources | = | array( string resourcePart1 *[, string resourcePartN ] ) | |
params 2 | = | array( | ['LANGUAGE' => '<lang>'] ) |
[, 'ALTREP' => '<alt.text>'] | |||
[, xparam] | |||
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty( 'resources', 'COMPUTER PROJECTOR' );
[index]format
getProperty( 'RRULE' )
getProperty( 'RRULE', int propOrderNo/FALSE, TRUE )
output = array | ( 'value' => recur 1 |
, 'params' => xparam 2 ) |
example
$rrules = $vtodo->getProperty( 'RRULE' );
format
setProperty( 'rrule', recur [, xparam ] )
For rules example see Exrule format and in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in text and HTML format.
recur 1 | = | see Exrule |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
format
getProperty( 'SEQUENCE' )
getProperty( 'SEQUENCE', FALSE , TRUE )
output = array | ( 'value' => sequence 1 |
, 'params' => xparam 2 ) |
example
$sequence = $vtodo->getProperty( 'SEQUENCE' );
format
setProperty( 'sequence'[, sequence [, xparam ]] )
sequence 1 | = | Value type INTEGER |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty( 'sequence', 2 );
$vevent->setProperty( 'sequence' );
// force sequence number to be set to 1 or, if sequence exists, incremented by 1
format
getProperty( 'STATUS' )
getProperty( 'STATUS', FALSE , TRUE )
output = array | ( 'value' => status 1 |
, 'params' => xparam 2 ) |
example
$status = $vtodo->getProperty( 'STATUS' );
format
setProperty( 'status', status [, xparam ] )
status 1 | = | "TENTATIVE" | ;Indicates event is tentative |
/ "CONFIRMED" | ;Indicates event is definite | ||
/ "CANCELLED" | ;Indicates event was cancelled | ||
;Status values for a "VEVENT" | |||
statvalue | = | "NEEDS-ACTION" | ;Indicates to-do needs action |
/ "COMPLETED" | ;Indicates to-do completed | ||
/ "IN-PROCESS" | ;Indicates to-do in process of | ||
/ "CANCELLED" | ;Indicates to-do was cancelled | ||
;Status values for "VTODO" | |||
statvalue | = | "DRAFT" | ;Indicates journal is draft |
/ "FINAL" | ;Indicates journal is final | ||
/ "CANCELLED" | ;Indicates journal is removed | ||
;Status values for "VJOURNAL" | |||
xparam 1 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty( 'Status', 'COMPLETED' );
[index]format
getProperty( 'SUMMARY' )
getProperty( 'SUMMARY', FALSE , TRUE )
output = array | ( 'value' => summary 1 |
, 'params' => params 2 ) |
example
$summary = $vtodo->getProperty( 'SUMMARY' );
format
setProperty( 'summary', summary [, params ] )
summary 1 | = | Value type TEXT, a short, one line summary about the activity or journal entry. | |
params 2 | = | array( | ['LANGUAGE' => '<lang>'] |
[, 'ALTREP' => '<alt.text>'] | |||
[, xparam ] ) | |||
xparam | = | *[ xparamkey => xparamvalue ] |
example
$vevent->setProperty( 'summary', 'This is a summary' );
[index]format
getProperty( 'TRANSP' )
getProperty( 'TRANSP', FALSE , TRUE )
output = array | ( 'value' => transp 1 |
, 'params' => xparam 2 ) |
example
$transp = $vtodo->getProperty( 'TRANSP' );
format
setProperty( 'transp', transp [, xparam ] )
transp 1 | = | "OPAQUE" / "TRANSPARENT" |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty( 'transp', 'TRANSPARENT' );
[index]format
getProperty( 'TRIGGER' )
getProperty( 'TRIGGER', FALSE , TRUE )
output | = array | ( 'value' => duration/date ) |
, 'params' => xparams ) | ||
duration | = array | ( 'week' => int week, 'relatedstart' => bool relstart, 'before' => bool before ) |
duration | = array | ( 'day' => int day, 'hour' => int hour, 'min' => int min, 'sec' => int sec, 'relatedstart' => bool relstart, 'before' => bool before ) |
relstart | = TRUE : related start, FALSE : related end | |
before | = TRUE : before relstart, FALSE : after relstart | |
date | = array | ( 'year' => int year, 'month' => int month [, 'week' => int week ] , 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec, 'tz' => string offset ] |
xparams | = array( *[ xparamkey => xparamvalue ] ) |
example
$trigger = $vtodo->getProperty( 'TRIGGER' );
format
setProperty( 'trigger', duration [,bool relatedEnd=FALSE [,bool after=FALSE [, param ]]])
setProperty( 'trigger', duration2 [, param ])
setProperty( 'trigger', date [, param ] )
setProperty( 'trigger', int year/FALSE, int month/FALSE, int day/FALSE [, int week/FALSE [, int hour/FALSE, int min/FALSE, int sec/FALSE [, bool relatedEnd=FALSE [, bool after=FALSE [, string offset/FALSE [, array xparam ]]]]]] )
duration | = | array ( 'week' => int week ) |
duration | = | array ( 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec ] ) |
duration2 | = | string dur-value = (["+"] / "-") "P" (dur-date / dur-time / dur-week) |
dur-date | = | dur-day [dur-time] |
dur-time | = | "T" (dur-hour / dur-minute / dur-second) |
dur-week | = | 1*DIGIT "W" |
dur-hour | = | 1*DIGIT "H" [dur-minute] |
dur-minute | = | 1*DIGIT "M" [dur-second] |
dur-second | = | 1*DIGIT "S" |
dur-day | = | 1*DIGIT "D" |
date 1 | = | array ( 'year' => int year, 'month' => int month, 'day' => int day [, 'hour' => int hour, 'min' => int min, 'sec' => int sec, 'tz' => string offset ] ) |
date | = | array ( 'timestamp' => int timestamp [, 'tz' => string offset ] ) |
offset | = | (+/-)HHmm[ss], local date + UTC offset sets UTC format date |
date | = | string datestring // UTC date in a string, acceptable by strtotime-command, ex. '14 august 2006 16.00.00' (due to strtotime-limitation, dates before 'January 1 1970 00:00:00 GMT'.. .) |
param | = | array( [[ reltype ] / [ datetimeparam ]] [, xparams ] ) |
reltyp | = | 'RELATED' => 'START' (default) / 'END' |
datetimeparam | = | 'VALUE' => 'DATE-TIME' |
xparam | = | *[ xparamkey => xparamvalue ] |
example 1
$valarm->setProperty | ( | 'trigger' |
, | FALSE, FALSE, FALSE, FALSE, 1, 2, 3, TRUE, TRUE ); | |
// alt. | ||
$valarm->setProperty | ( | 'trigger' |
, | array ('hour'=>1,'min'=>2,'sec'=>3),TRUE,TRUE); | |
// alt. | ||
$valarm->setProperty | ( | 'trigger' |
, | 'PT1H2M3S', array ( 'related' => 'end'); |
example 2
$valarm->setProperty | ( | 'trigger' |
, | FALSE, FALSE, FALSE, 1 ); | |
// alt. | ||
$valarm->setProperty | ( | 'trigger' |
, | array ( 'week' => 1 )); | |
// alt. | ||
$valarm->setProperty | ( | 'trigger' |
, | '-P1W'; |
example 3
$valarm->setProperty | ( | 'trigger' |
, | array( 'year' => 2007, 'month' => 6, 'day' => 5, 'hour' => 2, 'min' => 2, 'sec' => 3, 'tz' => '-0200' ) ); |
example 4
$valarm->setProperty | ( | 'trigger' |
, | array( 'year' => 2007, 'month' => 6, 'day' => 5, 'hour' => 2, 'min' => 2, 'sec' => 3 ) ); |
format
getProperty( 'TZID' )
getProperty( 'TZID', FALSE , TRUE )
output = array | ( 'value' => tzid 1 |
, 'params' => xparam 2 ) |
example
$tzid = $vtimezone->getProperty( 'TZID' );
format
setProperty( 'tzid', tzid [, xparam ] )
tzid 1 | = | Value type TEXT |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( 'tzid', 'US-Eastern' );
.. .
format
getProperty( 'TZNAME' )
getProperty( 'TZNAME', int propOrderNo/FALSE, TRUE )
output = array | ( 'value' => tzname 1 |
, 'params' => params 2 ) |
example
$tzname = $timezonestandard->getProperty( 'TZNAME' );
format
setProperty( 'tzname', tzname [, params ] )
tzname 1 | = | Value type TEXT |
params 2 | = | array( [ 'LANGUAGE' => '<lang>' ] [, xparam ] ) |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( 'Tzid', 'US-Eastern' );
$timezone->setProperty( 'Last-Modified', '19870101' );
$timezonestandard = new vtimezone( 'standard' );
$timezonestandard->setProperty( 'tzname', 'EST' );
.. .
format
getProperty( 'TZOFFSETFROM' )
getProperty( 'TZOFFSETFROM', FALSE , TRUE )
output = array | ( 'value' => tzoffsetfrom 1 |
, 'params' => xparam 2 ) |
example
$tzoffsetfrom = $timezonestandard->getProperty( 'TZOFFSETFROM' );
format
setProperty( 'tzoffsetfrom', tzoffsetfrom [, xparam ] )
tzoffsetfrom 1 | = | (+/-)HHmm[ss], UTC offset |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( 'Tzid', 'US-Eastern' );
$timezone->setProperty( 'Last-Modified', '19870101' );
$timezonestandard = new vtimezone( 'standard' );
$timezonestandard->setProperty( 'tzname', 'EST' );
$timezonestandard->setProperty( 'tzoffsetfrom', '-0500' );
.. .
format
getProperty( 'TZOFFSETTO' )
getProperty( 'TZOFFSETTO', FALSE , TRUE )
output = array | ( 'value' => tzoffsetto 1 |
, 'params' => xparam 2 ) |
example
$tzoffsetto = $timezonestandard->getProperty( 'TZOFFSETTO' );
format
setproperty( 'tzoffsetto', tzoffsetto [, xparam ] )
tzoffsetto 1 | = | (+/-)HHmm[ss], UTC offset |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( 'Tzid', 'US-Eastern' );
$timezone->setProperty( 'Last-Modified', '19870101' );
$timezonestandard = new vtimezone( 'standard' );
.. .
$timezonedaylight = new vtimezone( 'daylight' );
$timezonedaylight->setProperty( 'tzoffsetto', '1345' );
.. .
format
getProperty( 'TZURL' )
getProperty( 'TZURL', FALSE , TRUE )
output = array | ( 'value' => tzurl 1 |
, 'params' => xparam 2 ) |
example
$tzurl = $timezonestandard->getProperty( 'TZURL' );
format
setProperty( 'tzurl', tzurl [, xparam ] )
tzurl 1 | = | Value type URI |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( 'Tzid', 'US-Eastern' );
$timezone->setProperty( 'Last-Modified', '19870101T000000' );
$timezone->setProperty( 'tzurl', 'http://zones.stds_r_us.net/tz/US-Eastern' );
.. .
format
getProperty( 'UID' )
getProperty( 'UID', FALSE , TRUE )
output = array | ( 'value' => uid 1 |
, 'params' => xparam 2 ) |
example
$uid = $vevent->getProperty( 'UID' );
format
setProperty( 'uid', uid [, xparam ] )
uid 1 | = | Value type TEXT |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ) |
example
$vevent->setProperty('uid','20070803T194810CEST-Lm0kU3PXiX@domain.com');
[index]format
getProperty( 'URL' )
getProperty( 'URL', FALSE , TRUE )
output = array | ( 'value' => url 1 |
, 'params' => xparam 2 ) |
example
$url = $vevent->getProperty( 'URL' );
format
setProperty( 'url', url [, xparam ] )
url 1 | = | Value type URI |
xparam 2 | = | array( *[ xparamkey => xparamvalue ] ( |
example
$vtodo->setProperty( 'url', 'http://www.icaldomain.net' );
[index]format
getProperty()
getProperty( FALSE, int propOrderNo/FALSE, TRUE )
output = array | ( propertyName 1 | ||
, array | ( 'value' | => propertyData 2 ) | |
, 'params' | => params 3)) |
example 1
$v = new vcalendar();
$v->parse( 'file.ics' );
while( $xprop = $v->getProperty( )) {
.. .
example 2
$v = new vcalendar();
$v->parse( 'file.ics' );
while( $xprop = $v->getProperty( 'X-ABC-MMSUBJ' )) {
.. .
example 3
$v = new vcalendar();
$v->parse( 'file.ics' );
while( $xprop = $v->getProperty( FALSE, FALSE, TRUE )) {
.. .
$xprop = array | ( propertyName 1 | ||
, array | ( 'value' | => propertyData 2 ) | |
, 'params' | => params 3 ) |
format
setProperty( propertyName, propertyData [, params ] )
propertyName 1 | = | Any property name with a "X-" prefix |
propertyData 2 | = | Value type TEXT |
params 3 | = | array( ['LANGUAGE' => '<lang>'] [, xparam] ) |
xparam | = | *[ xparamkey => xparamvalue ] |
example
$component->setProperty('X-ABC-MMSUBJ','http://load.noise.org/mysubj.wav');
[index]format
getConfig( 'language' )
example
$lang = $vevent->getConfig( 'language' );
format
setConfig( 'language', string <lang> )
example
$vevent->setConfig( 'lang', 'en' );
[index]format
deleteComponent( int orderNumber )
Remove component with order number (1st=1, 2nd=2.. .).
deleteComponent( string componentType [, int componentSuborderNumber])
Remove component with component type (ex. 'vevent') and order 1 alt. suborder number.
deleteComponent( string UID )
Remove component with UID. N.B UID is NOT set for alarm/timzone components.
example
$v = new vcalendar();
$v->parse( 'file.ics' );
$comp1 = $v->getComponent());
$comp1->deleteComponent( 1 );
.. .
format
getComponent()
Get next component until end-of-components.
getComponent( int orderNumber )
Get component with order number (1st=1, 2nd=2.. .).
getComponent( string componentType [, int componentSuborderNumber])
Get (next) component with component type (until end-of-components) alt.
Get component with component type and suborder number (1st=1, 2nd=2.. .).
getComponent( string UID )
Get component with UID. N.B UID is NOT set for alarm/timzone components.
example
$v = new vcalendar();
$v->parse( 'file.ics' );
$comp1 = $v->getComponent());
while( $subComp = $comp1->getComponent()) {
.. .
format
setComponent( component )
addSubComponent( component ) // alias
Insert last in component chain.
setComponent( component, int orderNumber )
Replace component with order number(1st=1, 2nd=2.. .). If orderNumber is not found, component is inserted last in chain.
setComponent( component, string componentType [, component suborder number])
Replace component with component type and component order number. if orderNumber is not found, component is inserted last in chain.
setComponent( component, string UID )
Replace component with UID. N.B UID is NOT set for alarm/timzone components.
example
$calendar = new vcalendar(); | // initiate new CALENDAR | |
.. . | ||
$vevent = new vevent(); | // initiate EVENT | |
$vevent->setProperty | ( 'dtstart' | // add some event properties |
, 2006, 12, 24, 19, 30, 00 ); | ||
$vevent->setProperty(.. . | ||
.. . | ||
$valarm = new valarm(); | // initiate ALARM | |
$valarm->setProperty( 'trigger', .. . | ||
.. . | ||
$vevent->setComponent ( $valarm ); | // add alarm to event | |
.. . |