PHP Class Kronolith_FreeBusy, horde

Author: Chuck Hagenbuch ([email protected])
显示文件 Open project: horde/horde Class Usage Examples

Public Methods

Method Description
generate ( string | array $calendars, integer $startstamp = null, integer $endstamp = null, boolean $returnObj = false, string $user = null ) : string Generates the free/busy text for $calendars.
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.
getForUser ( string $user, array $opts = [] ) : Horde_Icalendar_Vfreebusy | object Retrieves the free/busy information for a given user.
getUrl ( string $email ) : mixed Searches address books for the freebusy URL for a given email address.
toJson ( Horde_Icalendar_Vfreebusy $fb ) : object Converts free/busy data to a simple object suitable to be transferred as json.

Method Details

generate() public static method

Generates the free/busy text for $calendars.
public static generate ( string | array $calendars, integer $startstamp = null, integer $endstamp = null, boolean $returnObj = false, string $user = null ) : string
$calendars string | array The calendar to view free/busy slots for.
$startstamp integer The start of the time period to retrieve.
$endstamp integer The end of the time period to retrieve.
$returnObj boolean Default false. Return a vFreebusy object instead of text.
$user string Set organizer to this user.
return string The free/busy text.

get() public static method

Retrieves the free/busy information for a given email address, if any information is available.
public static get ( string $email, boolean $json = false ) : Horde_Icalendar_Vfreebusy | object
$email string The email address to look for.
$json boolean Whether to return the free/busy data as a simple object suitable to be transferred as json.
return Horde_Icalendar_Vfreebusy | object Free/busy component.

getForUser() public static method

Retrieves the free/busy information for a given user.
public static getForUser ( string $user, array $opts = [] ) : Horde_Icalendar_Vfreebusy | object
$user string The user to look for.
$opts array 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
return Horde_Icalendar_Vfreebusy | object Free/busy component.

getUrl() public static method

Searches address books for the freebusy URL for a given email address.
public static getUrl ( string $email ) : mixed
$email string The email address to look for.
return mixed The url on success or false on failure.

toJson() public static method

Converts free/busy data to a simple object suitable to be transferred as json.
public static toJson ( Horde_Icalendar_Vfreebusy $fb ) : object
$fb Horde_Icalendar_Vfreebusy A Free/busy component.
return object A simple object representation.