Property | Type | Description | |
---|---|---|---|
$type | string | The component type of this class. |
Property | Type | Description | |
---|---|---|---|
$_attributes | array | The name/value pairs of attributes for this object (UID, DTSTART, etc.). Which are present depends on the object and on what kind of component it is. | |
$_components | array | Any children (contained) iCalendar components of this object. | |
$_container | Horde_Icalendar | The parent (containing) iCalendar object. | |
$_newline | string | According to RFC 2425, we should always use CRLF-terminated lines. | |
$_oldFormat | These 'old' formats are defined by www.imc.org. The 'new' (non-old) formats icalendar 2.0 and vcard 3.0 are defined in rfc2426 and rfc2445 respectively. | ||
$_version | string | iCalendar format version (different behavior for 1.0 and 2.0 especially with recurring events). |
Method | Description | |
---|---|---|
__construct ( $version = '2.0' ) | Constructor. | |
_exportDateTime ( integer | object | array $value, boolean $floating = false ) : string | Export a DateTime field. | |
_exportUtcOffset ( $value ) : TODO | Export a UTC Offset field. | |
_parseDate ( $text ) : array | Parses a Date field. | |
_parseDateTime ( $text, $tzid = false ) : TODO | Parses a DateTime field and returns a unix timestamp. If the field cannot be parsed then the original text is returned unmodified. | |
addComponent ( $components ) | Add a vCalendar component (eg vEvent, vTimezone, etc.). | |
clear ( ) | Clears the iCalendar object (resets the components and attributes arrays). | |
exportvCalendar ( ) : TODO | Export as vCalendar format. | |
findComponent ( $childclass ) : boolean | Horde_Icalendar_ | Locates the first child component of the specified class, and returns a reference to it. | |
findComponentByAttribute ( string $childclass, string $attribute, string $value = null ) : boolean | Horde_Icalendar_ | Locates the first matching child component of the specified class, and returns a reference to it. | |
getAllAttributes ( string $tag = false ) : array | Get attributes for all tags or for a given tag. | |
getAttribute ( string $name, boolean $params = false ) : mixed | Get the value of an attribute. | |
getAttributeDefault ( string $name, mixed $default = '' ) : mixed | Returns the value of an attribute, or a specified default value if the attribute does not exist. | |
getAttributeSingle ( string $name ) : string | Get a single value of an attribute. | |
getAttributeValues ( string $name ) : array | Gets the values of an attribute as an array. Multiple values are possible due to: | |
getComponent ( integer $idx ) : mixed | Retrieve a specific component. | |
getComponentClasses ( ) : array | Return the classes (entry types) we have. | |
getComponentCount ( ) : integer | Number of components in this container. | |
getComponents ( ) : array | Retrieve all the components. | |
getType ( ) : TODO | TODO | |
newComponent ( string $type, Horde_Icalendar $container ) : object | Return a reference to a new component. | |
parsevCalendar ( string $text, string $base = 'VCALENDAR', boolean $clear = true ) : boolean | Parses a string containing vCalendar data. | |
removeAttribute ( string $name ) | Remove all occurences of an attribute. | |
setAttribute ( string $name, string $value, array $params = [], boolean $append = true, array $values = false ) | Sets the value of an attribute. | |
setParameter ( string $name, array $params = [] ) : boolean | Sets parameter(s) for an (already existing) attribute. The parameter set is merged into the existing set. | |
setVersion ( string $version ) | Sets the version of this component. | |
toHash ( boolean $paramsInKeys = false ) : array | Export this entry as a hash array with tag names as keys. | |
toString ( ) |
Method | Description | |
---|---|---|
_checkEndDate ( integer $t, array $times ) : boolean | Utility method to aid in checking the end date of a transition. | |
_exportDate ( object | array $value, string $autoconvert = false ) : TODO | Exports a date field. | |
_exportDuration ( $value ) | Export a duration value. | |
_exportPeriod ( $value ) : TODO | Export a Time Period field. | |
_exportvData ( string $base = 'VCALENDAR' ) : string | Export this component in vCal format. | |
_parseDuration ( string $text ) : integer | Parses a DURATION value field. | |
_parsePeriod ( $text ) : array | Parse a Time Period field. | |
_parseTZID ( array $date, array $time, string $tzid ) : integer | Groks the TZID and returns an offset in seconds from UTC for this date and time. | |
_parseTime ( $text ) : TODO | Parses a Time field. | |
_parseUtcOffset ( $text ) : TODO | Parse a UTC Offset field. |
public _exportDateTime ( integer | object | array $value, boolean $floating = false ) : string | ||
$value | integer | object | array | The time value to export (either a Horde_Date, array, or timestamp). |
$floating | boolean | Whether to return a floating date-time (without time zone information). |
return | string | The string representation of the datetime value. |
protected _exportDuration ( $value ) | ||
$value | TODO |
protected _exportPeriod ( $value ) : TODO | ||
$value | TODO | |
return | TODO |
public _exportUtcOffset ( $value ) : TODO | ||
$value | TODO | |
return | TODO |
protected _exportvData ( string $base = 'VCALENDAR' ) : string | ||
$base | string | The type of the base object. |
return | string | vCal format data. |
public _parseDate ( $text ) : array | ||
$text | TODO | |
return | array | TODO |
public _parseDateTime ( $text, $tzid = false ) : TODO | ||
$tzid | TODO | |
return | TODO |
protected _parseDuration ( string $text ) : integer | ||
$text | string | A DURATION value. |
return | integer | The duration in seconds. |
protected _parsePeriod ( $text ) : array | ||
$text | TODO | |
return | array | TODO |
protected _parseTime ( $text ) : TODO | ||
$text | TODO | |
return | TODO |
protected _parseUtcOffset ( $text ) : TODO | ||
$text | TODO | |
return | TODO |
public addComponent ( $components ) |
public clear ( ) |
public exportvCalendar ( ) : TODO | ||
return | TODO |
public findComponent ( $childclass ) : boolean | Horde_Icalendar_ | ||
return | boolean | Horde_Icalendar_ |
public findComponentByAttribute ( string $childclass, string $attribute, string $value = null ) : boolean | Horde_Icalendar_ | ||
$childclass | string | The type of component to find. |
$attribute | string | This attribute must be set in the component for it to match. |
$value | string | Optional value that $attribute must match. |
return | boolean | Horde_Icalendar_ |
public getAllAttributes ( string $tag = false ) : array | ||
$tag | string | Return attributes for this tag, or all attributes if not given. |
return | array | An array containing all the attributes and their types. |
public getAttribute ( string $name, boolean $params = false ) : mixed | ||
$name | string | The name of the attribute. |
$params | boolean | Return the parameters for this attribute instead of its value. |
return | mixed | (string) The value of the attribute. (array) The parameters for the attribute or multiple values for an attribute. |
public getAttributeSingle ( string $name ) : string | ||
$name | string | The name of the attribute. |
return | string | The value of the attribute. |
public getAttributeValues ( string $name ) : array | ||
$name | string | The name of the attribute. |
return | array | Multiple values for an attribute. |
public getComponent ( integer $idx ) : mixed | ||
$idx | integer | The index of the object to retrieve. |
return | mixed | (boolean) False if the index does not exist. (Horde_Icalendar_*) The requested component. |
public getComponentClasses ( ) : array | ||
return | array | Hash with class names Horde_Icalendar_xxx as keys and number of components of this class as value. |
public getComponentCount ( ) : integer | ||
return | integer | Number of components in this container. |
public getComponents ( ) : array | ||
return | array | Array of Horde_Icalendar objects. |
public static newComponent ( string $type, Horde_Icalendar $container ) : object | ||
$type | string | The type of component to return |
$container | Horde_Icalendar | A container that this component will be associated with. |
return | object | Reference to a Horde_Icalendar_* object as specified. |
public removeAttribute ( string $name ) | ||
$name | string | The name of the attribute. |
public setAttribute ( string $name, string $value, array $params = [], boolean $append = true, array $values = false ) | ||
$name | string | The name of the attribute. |
$value | string | The value of the attribute. |
$params | array | Array containing any addition parameters for this attribute. |
$append | boolean | True to append the attribute, False to replace the first matching attribute found. |
$values | array | Array representation of $value. For comma/semicolon seperated lists of values. If not set use $value as single array element. |
public setVersion ( string $version ) | ||
$version | string | A float-like version string. |
public toHash ( boolean $paramsInKeys = false ) : array | ||
$paramsInKeys | boolean | If false, the operation can be quite lossy as the parameters are ignored when building the array keys. So if you export a vcard with LABEL;TYPE=WORK:foo LABEL;TYPE=HOME:bar the resulting hash contains only one label field! If set to true, array keys look like 'LABEL;TYPE=WORK' |
return | array | A hash array with tag names as keys. |
protected array $_attributes | ||
return | array |
protected array $_components | ||
return | array |
protected Horde_Icalendar $_container | ||
return | Horde_Icalendar |
protected string $_newline | ||
return | string |
protected $_oldFormat |
protected string $_version | ||
return | string |