Class Webcal_Sabre_CalDAV_Backend_PDO

Description

PDO CalDAV backend

This class implements the PDO interface for Sabre_CalDAV by manipulating Webcalendar objects.

  • author: Dick Balaska (http://www.buckosoft.com)
  • author: Evert Pot (http://www.rooftopsolutions.nl/)
  • copyright: Copyright (C) 2007-2010 Rooftop Solutions. All rights reserved.
  • copyright: Copyright (C) 2010 BuckoSoft, Corp.
  • license: Modified BSD License

Located in /server/Webcal_Sabre_CalDAV_Backend_PDO.php (line 17)

Sabre_CalDAV_Backend_PDO
   |
   --Webcal_Sabre_CalDAV_Backend_PDO
Method Summary
 Webcal_Sabre_CalDAV_Backend_PDO __construct ( $pdo)
 mixed createCalendar (string $principalUri, string $calendarUri,  $properties)
 void createCalendarObject (string $calendarId, string $objectUri, string $calendarData)
 void deleteCalendar (string $calendarId)
 void deleteCalendarObject (string $calendarId, string $objectUri)
 array getCalendarObject (string $calendarId, string $objectUri)
 array getCalendarObjects (string $calendarId)
 array getCalendarsForUser ( $principalUri, string $userUri)
 bool|array updateCalendar (string $calendarId,  $properties)
 void updateCalendarObject (string $calendarId, string $objectUri, string $calendarData)
Methods
Constructor __construct (line 24)

Creates the backend

  • access: public
Webcal_Sabre_CalDAV_Backend_PDO __construct ( $pdo)
  • PDO $pdo
createCalendar (line 89)

Creates a new calendar for a principal.

If the creation was a success, an id must be returned that can be used to reference this calendar in other methods, such as updateCalendar

  • todo: NOT IMPLEMENTED
  • access: public
mixed createCalendar (string $principalUri, string $calendarUri,  $properties)
  • string $principalUri
  • string $calendarUri
  • array $properties
createCalendarObject (line 317)

Creates a new calendar object.

  • access: public
void createCalendarObject (string $calendarId, string $objectUri, string $calendarData)
  • string $calendarId
  • string $objectUri
  • string $calendarData
deleteCalendar (line 235)

Delete a calendar and all it's objects

  • todo: NOT IMPLEMENTED
  • access: public
void deleteCalendar (string $calendarId)
  • string $calendarId
deleteCalendarObject (line 358)

Deletes an existing calendar object.

  • access: public
void deleteCalendarObject (string $calendarId, string $objectUri)
  • string $calendarId
  • string $objectUri
getCalendarObject (line 296)

Returns information from a single calendar object, based on it's object uri.

  • access: public
array getCalendarObject (string $calendarId, string $objectUri)
  • string $calendarId
  • string $objectUri
getCalendarObjects (line 251)

Returns all calendar objects within a calendar object.

  • access: public
array getCalendarObjects (string $calendarId)
  • string $calendarId
getCalendarsForUser (line 36)

Returns a list of calendars for a principal

  • access: public
array getCalendarsForUser ( $principalUri, string $userUri)
  • string $userUri
  • $principalUri
updateCalendar (line 168)

Updates a calendars properties

The properties array uses the propertyName in clark-notation as key, and the array value for the property value. In the case a property should be deleted, the property value will be null.

This method must be atomic. If one property cannot be changed, the entire operation must fail.

If the operation was successful, true can be returned. If the operation failed, false can be returned.

Deletion of a non-existant property is always succesful.

Lastly, it is optional to return detailed information about any failures. In this case an array should be returned with the following structure:

array( 403 => array( '{DAV:}displayname' => null, ), 424 => array( '{DAV:}owner' => null, ) )

In this example it was forbidden to update {DAV:}displayname. (403 Forbidden), which in turn also caused {DAV:}owner to fail (424 Failed Dependency) because the request needs to be atomic.

  • todo: NOT IMPLEMENTED
  • access: public
bool|array updateCalendar (string $calendarId,  $properties)
  • string $calendarId
  • array $properties
updateCalendarObject (line 340)

Updates an existing calendarobject, based on it's uri.

  • access: public
void updateCalendarObject (string $calendarId, string $objectUri, string $calendarData)
  • string $calendarId
  • string $objectUri
  • string $calendarData

Documentation generated on Thu, 10 Jun 2010 17:08:41 -0400 by phpDocumentor 1.4.3