\Kronolith_FreeBusy

Free/Busy functionality.

Summary

Methods
Properties
Constants
generate()
getForUser()
get()
getUrl()
toJson()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

generate()

generate(string|array  $calendars, integer  $startstamp = null, integer  $endstamp = null, boolean  $returnObj = false, string  $user = null) : string

Generates the free/busy text for $calendars.

Parameters

string|array $calendars

The calendar to view free/busy slots for.

integer $startstamp

The start of the time period to retrieve.

integer $endstamp

The end of the time period to retrieve.

boolean $returnObj

Default false. Return a vFreebusy object instead of text.

string $user

Set organizer to this user.

Throws

\Horde_Exception,

Kronolith_Exception

Returns

string —

The free/busy text.

getForUser()

getForUser(string  $user, array  $opts = array()) : \Horde_Icalendar_Vfreebusy|object

Retrieves the free/busy information for a given user.

Parameters

string $user

The user to look for.

array $opts

Options:

  • json: (boolean) Whether to return the free/busy data as a simple object suitable to be transferred as json. DEFAULT: false
  • start: (integer) The start of the time period to retrieve. DEFAULT: now
  • end: (integer) The end of the time period to retrieve. DEFAULT: now + freebusy_days pref

Throws

\Kronolith_Exception

Returns

\Horde_Icalendar_Vfreebusy|object —

Free/busy component.

get()

get(string  $email, boolean  $json = false) : \Horde_Icalendar_Vfreebusy|object

Retrieves the free/busy information for a given email address, if any information is available.

Parameters

string $email

The email address to look for.

boolean $json

Whether to return the free/busy data as a simple object suitable to be transferred as json.

Throws

\Kronolith_Exception

Returns

\Horde_Icalendar_Vfreebusy|object —

Free/busy component.

getUrl()

getUrl(string  $email) : mixed

Searches address books for the freebusy URL for a given email address.

Parameters

string $email

The email address to look for.

Returns

mixed —

The url on success or false on failure.

toJson()

toJson(\Horde_Icalendar_Vfreebusy  $fb) : object

Converts free/busy data to a simple object suitable to be transferred as json.

Parameters

\Horde_Icalendar_Vfreebusy $fb

A Free/busy component.

Returns

object —

A simple object representation.