Class Horde_Icalendar_Vfreebusy
Class representing vFreebusy components.
Copyright 2003-2012 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.
-
Horde_Icalendar
-
Horde_Icalendar_Vfreebusy
Methods summary
public
boolean
|
#
parsevCalendar( string $data, mixed $type = null, mixed $charset = null )
Parses a string containing vFreebusy data.
Parses a string containing vFreebusy data.
Parameters
- $data
- The data to parse.
- $type
- TODO
- $charset
- TODO
Returns
boolean True on successful import, false otherwise.
Throws
Overrides
|
public
string
|
#
exportvCalendar( )
Returns the component exported as string.
Returns the component exported as string.
Returns
string The exported vFreeBusy information according to the
iCalendar format specification.
Overrides
|
public
string
|
#
getName( )
Returns a display name for this object.
Returns a display name for this object.
Returns
string A clear text name for displaying this object.
|
public
string
|
#
getEmail( )
Returns the email address for this object.
Returns the email address for this object.
Returns
string The email address of this object's owner.
|
public
array
|
#
getBusyPeriods( )
Returns the busy periods.
Returns the busy periods.
Returns
array All busy periods.
|
public
array
|
#
getFreePeriods( integer $startStamp, integer $endStamp )
Returns all the free periods of time in a given period.
Returns all the free periods of time in a given period.
Parameters
- $startStamp
- The start timestamp.
- $endStamp
- The end timestamp.
Returns
array A hash with free time periods, the start times as the
keys and the end times as the values.
|
public
|
#
addBusyPeriod( string $type, integer $start, integer $end = null, integer $duration = null, array $extra = array() )
Adds a busy period to the info.
Adds a busy period to the info.
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).
Parameters
- $type
- <p>The type of the period. Either 'FREE' or
'BUSY'; only 'BUSY' supported at the moment.</p>
- $start
- The start timestamp of the period.
- $end
- The end timestamp of the period.
- $duration
- <p>The duration of the period. If specified, the
$end parameter will be ignored.</p>
- $extra
- Additional parameters for this busy period.
|
public
integer
|
#
getStart( )
Returns the timestamp of the start of the time period this free busy
information covers.
Returns the timestamp of the start of the time period this free busy
information covers.
Returns
integer A timestamp.
|
public
integer
|
#
getEnd( )
Returns the timestamp of the end of the time period this free busy
information covers.
Returns the timestamp of the end of the time period this free busy
information covers.
Returns
integer A timestamp.
|
public
|
#
merge( Horde_Icalendar_Vfreebusy $freebusy, boolean $simplify = true )
Merges the busy periods of another Horde_Icalendar_Vfreebusy object
into this one.
Merges the busy periods of another Horde_Icalendar_Vfreebusy object
into this one.
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).
Parameters
- $freebusy
- A freebusy object.
- $simplify
- <p>If true, simplify() will
called after the merge.</p>
|
public
|
#
simplify( )
Removes all overlaps and simplifies the busy periods array as much as
possible.
Removes all overlaps and simplifies the busy periods array as much as
possible.
|
Methods inherited from Horde_Icalendar
__construct(),
_exportDateTime(),
_exportUtcOffset(),
_parseDate(),
_parseDateTime(),
addComponent(),
clear(),
findComponent(),
findComponentByAttribute(),
getAllAttributes(),
getAttribute(),
getAttributeDefault(),
getAttributeValues(),
getComponent(),
getComponentClasses(),
getComponentCount(),
getComponents(),
getType(),
newComponent(),
removeAttribute(),
setAttribute(),
setParameter(),
setVersion(),
toHash()
|
Properties summary
public
string
|
$type
The component type of this class.
The component type of this class.
|
|