Property | Type | Description | |
---|---|---|---|
$_cache | array | Cache events as we fetch them to avoid fetching or parsing the same event twice. | |
$_client | Sabre\DAV\Client | DAV client object. | |
$_davSupport | array | A list of DAV support levels. | |
$_permission | integer | The Horde_Perms permissions mask matching the CalDAV ACL. |
Method | Description | |
---|---|---|
backgroundColor ( ) : string | Returns the background color of the current calendar. | |
getEvent ( $eventId = null ) | ||
getPermission ( ) : integer | Returns the permissions for the current calendar. | |
getRemoteCalendar ( boolean $cache = true ) : Horde_Icalendar | Fetches a remote calendar into the cache and return the data. | |
isCalDAV ( ) : boolean | Returns whether the remote calendar is a CalDAV server, and propagates the $_davSupport propery with the server's DAV capabilities. | |
listAlarms ( $date, $fullevent = false ) | ||
open ( string $calendar ) | Selects a calendar as the currently opened calendar. |
Method | Description | |
---|---|---|
_addEvent ( Kronolith_Event $event ) : string | Adds an event to the backend. | |
_convertEvents ( Horde_Icalendar $ical ) : array | Converts all components of a Horde_Icalendar container into a Kronolith_Event list. | |
_deleteEvent ( string $eventId, boolean $silent = false ) | Deletes an event. | |
_getClient ( string $uri ) : Sabre\DAV\Client | Returns a configured, cached DAV client. | |
_getRemoteEvents ( ) : array | Fetches a remote calendar and converts it to Kronolith_Event objects. | |
_getUrl ( ) : string | Returns the URL of this calendar. | |
_listCalDAVEvents ( $startDate = null, $endDate = null, boolean $showRecurrence = false, boolean $hasAlarm = false, boolean $json = false, boolean $coverDates = true, $hideExceptions = false ) : array | Lists all events in the time range, optionally restricting results to only events with alarms. | |
_listEvents ( Horde_Date $startDate = null, Horde_Date $endDate = null, array $options = [] ) | Lists all events in the time range, optionally restricting results to only events with alarms. | |
_listWebDAVEvents ( $startDate = null, $endDate = null, boolean $showRecurrence = false, boolean $hasAlarm = false, boolean $json = false, boolean $coverDates = true, $hideExceptions = false ) : array | Lists all events in the time range, optionally restricting results to only events with alarms. | |
_processComponents ( array &$results, array $events, $startDate, $endDate, boolean $showRecurrence, boolean $json, boolean $coverDates, boolean $hideExceptions, string $id = null ) | Processes the components of a Horde_Icalendar container into an event list. | |
_request ( string $method, string $url, XMLWriter $xml = null, array $headers = [] ) : array | Sends a CalDAV request. | |
_saveEvent ( Kronolith_Event $event ) : Sabre\HTTP\ResponseInterface | Updates an existing event in the backend. | |
_updateEvent ( Kronolith_Event $event ) : string | Updates an existing event in the backend. |
protected _convertEvents ( Horde_Icalendar $ical ) : array | ||
$ical | Horde_Icalendar | A Horde_Icalendar container. |
return | array | List of Kronolith_Event_Ical objects. |
protected _deleteEvent ( string $eventId, boolean $silent = false ) | ||
$eventId | string | The ID of the event to delete. |
$silent | boolean | Don't send notifications, used when deleting events in bulk from maintenance tasks. |
protected _getClient ( string $uri ) : Sabre\DAV\Client | ||
$uri | string | The base URI for any requests. |
return | Sabre\DAV\Client | A DAV client. |
protected _getRemoteEvents ( ) : array | ||
return | array | List of Kronolith_Event_Ical objects. |
protected _listCalDAVEvents ( $startDate = null, $endDate = null, boolean $showRecurrence = false, boolean $hasAlarm = false, boolean $json = false, boolean $coverDates = true, $hideExceptions = false ) : array | ||
$showRecurrence | boolean | Return every instance of a recurring event? If false, will only return recurring events once inside the $startDate - $endDate range. |
$hasAlarm | boolean | Only return events with alarms? |
$json | boolean | Store the results of the events' toJson() method? |
$coverDates | boolean | Whether to add the events to all days that they cover. $param boolean $hideExceptions Hide events that represent exceptions to a recurring event. |
return | array | Events in the given time range. |
protected _listEvents ( Horde_Date $startDate = null, Horde_Date $endDate = null, array $options = [] ) | ||
$startDate | Horde_Date | The start of range date. |
$endDate | Horde_Date | The end of date range. |
$options | array | Additional options: - show_recurrence: (boolean) Return every instance of a recurring event? DEFAULT: false (Only return recurring events once inside $startDate - $endDate range) - has_alarm: (boolean) Only return events with alarms. DEFAULT: false (Return all events) - json: (boolean) Store the results of the event's toJson() method? DEFAULT: false - cover_dates: (boolean) Add the events to all days that they cover? DEFAULT: true - hide_exceptions: (boolean) Hide events that represent exceptions to a recurring event. DEFAULT: false (Do not hide exception events) - fetch_tags: (boolean) Fetch tags for all events. DEFAULT: false (Do not fetch event tags) |
protected _listWebDAVEvents ( $startDate = null, $endDate = null, boolean $showRecurrence = false, boolean $hasAlarm = false, boolean $json = false, boolean $coverDates = true, $hideExceptions = false ) : array | ||
$showRecurrence | boolean | Return every instance of a recurring event? If false, will only return recurring events once inside the $startDate - $endDate range. |
$hasAlarm | boolean | Only return events with alarms? |
$json | boolean | Store the results of the events' toJson() method? |
$coverDates | boolean | Whether to add the events to all days that they cover. $param boolean $hideExceptions Hide events that represent exceptions to a recurring event. |
return | array | Events in the given time range. |
protected _processComponents ( array &$results, array $events, $startDate, $endDate, boolean $showRecurrence, boolean $json, boolean $coverDates, boolean $hideExceptions, string $id = null ) | ||
$results | array | Gets filled with the events in the given time range. |
$events | array | A list of Kronolith_Event_Ical objects. |
$showRecurrence | boolean | Return every instance of a recurring event? If false, will only return recurring events once inside the $startDate - $endDate range. |
$json | boolean | Store the results of the events' toJson() method? |
$coverDates | boolean | Whether to add the events to all days that they cover. |
$hideExceptions | boolean | Hide events that represent exceptions to a recurring event. |
$id | string | Enforce a certain event id (not UID). |
protected _request ( string $method, string $url, XMLWriter $xml = null, array $headers = [] ) : array | ||
$method | string | A request method. |
$url | string | A request URL. |
$xml | XMLWriter | An XMLWriter object with the body content. |
$headers | array | A hash with additional request headers. |
return | array | The Horde_Http_Response object and the parsed SimpleXMLElement results. |
protected _saveEvent ( Kronolith_Event $event ) : Sabre\HTTP\ResponseInterface | ||
$event | Kronolith_Event | The event to save. |
return | Sabre\HTTP\ResponseInterface | The HTTP response. |
protected _updateEvent ( Kronolith_Event $event ) : string | ||
$event | Kronolith_Event | The event to save. |
return | string | The event id. |
public backgroundColor ( ) : string | ||
return | string | The calendar color. |
public getPermission ( ) : integer | ||
return | integer | A Horde_Perms permission bit mask. |
public getRemoteCalendar ( boolean $cache = true ) : Horde_Icalendar | ||
$cache | boolean | Whether to return data from the cache. |
return | Horde_Icalendar | The calendar data. |
protected array $_cache | ||
return | array |
protected Client,Sabre\DAV $_client | ||
return | Sabre\DAV\Client |
protected array $_davSupport | ||
return | array |
protected int $_permission | ||
return | integer |