PHP Class Horde_Icalendar_Vfreebusy, horde

Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Mike Cochrane ([email protected])
Inheritance: extends Horde_Icalendar
Show file Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$type string The component type of this class.

Protected Properties

Property Type Description
$_busyPeriods array TODO
$_extraParams array TODO

Public Methods

Method Description
addBusyPeriod ( string $type, integer $start, integer $end = null, integer $duration = null, array $extra = [] ) Adds a busy period to the info.
exportvCalendar ( ) : string Returns the component exported as string.
getBusyPeriods ( ) : array Returns the busy periods.
getEmail ( ) : string Returns the email address for this object.
getEnd ( ) : integer Returns the timestamp of the end of the time period this free busy information covers.
getExtraParams ( ) : array Returns any additional freebusy parameters.
getFreePeriods ( integer $startStamp, integer $endStamp ) : array Returns all the free periods of time in a given period.
getName ( ) : string Returns a display name for this object.
getStart ( ) : integer Returns the timestamp of the start of the time period this free busy information covers.
merge ( Horde_Icalendar_Vfreebusy $freebusy, boolean $simplify = true ) Merges the busy periods of another Horde_Icalendar_Vfreebusy object into this one.
parsevCalendar ( string $data, $type = null, $charset = null ) Parses a string containing vFreebusy data.
simplify ( ) Removes all overlaps and simplifies the busy periods array as much as possible.

Protected Methods

Method Description
_simplify ( $busyPeriods, array $extraParams = [] ) : array TODO

Method Details

_simplify() protected method

TODO
protected _simplify ( $busyPeriods, array $extraParams = [] ) : array
$busyPeriods TODO
$extraParams array TODO
return array TODO

addBusyPeriod() public method

This function may throw away data in case you add a period with a start date that already exists. The longer of the two periods will be chosen (and all information associated with the shorter one will be removed).
public addBusyPeriod ( string $type, integer $start, integer $end = null, integer $duration = null, array $extra = [] )
$type string The type of the period. Either 'FREE' or 'BUSY'; only 'BUSY' supported at the moment.
$start integer The start timestamp of the period.
$end integer The end timestamp of the period.
$duration integer The duration of the period. If specified, the $end parameter will be ignored.
$extra array Additional parameters for this busy period.

exportvCalendar() public method

Returns the component exported as string.
public exportvCalendar ( ) : string
return string The exported vFreeBusy information according to the iCalendar format specification.

getBusyPeriods() public method

Returns the busy periods.
public getBusyPeriods ( ) : array
return array All busy periods.

getEmail() public method

Returns the email address for this object.
public getEmail ( ) : string
return string The email address of this object's owner.

getEnd() public method

Returns the timestamp of the end of the time period this free busy information covers.
public getEnd ( ) : integer
return integer A timestamp.

getExtraParams() public method

Returns any additional freebusy parameters.
public getExtraParams ( ) : array
return array Additional parameters of the freebusy periods.

getFreePeriods() public method

Returns all the free periods of time in a given period.
public getFreePeriods ( integer $startStamp, integer $endStamp ) : array
$startStamp integer The start timestamp.
$endStamp integer The end timestamp.
return array A hash with free time periods, the start times as the keys and the end times as the values.

getName() public method

Returns a display name for this object.
public getName ( ) : string
return string A clear text name for displaying this object.

getStart() public method

Returns the timestamp of the start of the time period this free busy information covers.
public getStart ( ) : integer
return integer A timestamp.

merge() public method

This might lead to simplification no matter what you specify for the "simplify" flag since periods with the same start date will lead to the shorter period being removed (see addBusyPeriod).
public merge ( Horde_Icalendar_Vfreebusy $freebusy, boolean $simplify = true )
$freebusy Horde_Icalendar_Vfreebusy A freebusy object.
$simplify boolean If true, simplify() will called after the merge.

parsevCalendar() public method

Parses a string containing vFreebusy data.
public parsevCalendar ( string $data, $type = null, $charset = null )
$data string The data to parse.
$type TODO
$charset TODO

simplify() public method

Removes all overlaps and simplifies the busy periods array as much as possible.
public simplify ( )

Property Details

$_busyPeriods protected property

TODO
protected array $_busyPeriods
return array

$_extraParams protected property

TODO
protected array $_extraParams
return array

$type public property

The component type of this class.
public string $type
return string