Class: Sabre_CalDAV_Backend_PDO

Source Location: /includes/classes/SabreDAV/lib/Sabre/CalDAV/Backend/PDO.php

Class Overview [line 15]

Sabre_CalDAV_Backend_Abstract
   |
   --Sabre_CalDAV_Backend_PDO

PDO CalDAV backend

Author(s):

  • Evert Pot (http://www.rooftopsolutions.nl/)

Version:

Copyright:

  • Copyright (C) 2007-2010 Rooftop Solutions. All rights reserved.

Variables

Constants

Methods


Child classes:

Webcal_Sabre_CalDAV_Backend_PDO
PDO CalDAV backend

Inherited Variables

Inherited Constants

Inherited Methods

Class: Sabre_CalDAV_Backend_Abstract

Sabre_CalDAV_Backend_Abstract::createCalendar()
Creates a new calendar for a principal.
Sabre_CalDAV_Backend_Abstract::createCalendarObject()
Creates a new calendar object.
Sabre_CalDAV_Backend_Abstract::deleteCalendar()
Delete a calendar and all it's objects
Sabre_CalDAV_Backend_Abstract::deleteCalendarObject()
Deletes an existing calendar object.
Sabre_CalDAV_Backend_Abstract::getCalendarObject()
Returns information from a single calendar object, based on it's object uri.
Sabre_CalDAV_Backend_Abstract::getCalendarObjects()
Returns all calendar objects within a calendar object.
Sabre_CalDAV_Backend_Abstract::getCalendarsForUser()
Returns a list of calendars for a principal
Sabre_CalDAV_Backend_Abstract::updateCalendar()
Updates properties on this node,
Sabre_CalDAV_Backend_Abstract::updateCalendarObject()
Updates an existing calendarobject, based on it's uri.


Class Details

PDO CalDAV backend

This backend is used to store calendar-data in a PDO database, such as sqlite or MySQL

Tags:

[ Top ]


Class Variables

$propertyMap = array(
        '{DAV:}displayname'                          => 'displayname',
        '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'description',
        '{urn:ietf:params:xml:ns:caldav}calendar-timezone'    => 'timezone',
        '{http://apple.com/ns/ical/}calendar-order'  => 'calendarorder',
        '{http://apple.com/ns/ical/}calendar-color'  => 'calendarcolor',
    )

[line 31]

List of CalDAV properties, and how they map to database fieldnames

Add your own properties by simply adding on to this array

Tags:

  • access - public

Type: array

Overrides:

[ Top ]


Class Methods

__construct

Sabre_CalDAV_Backend_PDO __construct( $pdo)

[line 44]

Creates the backend

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::__construct()
Creates the backend

Parameters:

  • PDO $pdo -

[ Top ]

createCalendar

mixed createCalendar( string $principalUri, string $calendarUri, $properties)

[line 108]

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

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::createCalendar()
Creates a new calendar for a principal.

Overrides Sabre_CalDAV_Backend_Abstract::createCalendar() (Creates a new calendar for a principal.)

Parameters:

  • string $principalUri -
  • string $calendarUri -
  • array $properties -

[ Top ]

createCalendarObject

void createCalendarObject( string $calendarId, string $objectUri, string $calendarData)

[line 300]

Creates a new calendar object.

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::createCalendarObject()
Creates a new calendar object.

Overrides Sabre_CalDAV_Backend_Abstract::createCalendarObject() (Creates a new calendar object.)

Parameters:

  • string $calendarId -
  • string $objectUri -
  • string $calendarData -

[ Top ]

deleteCalendar

void deleteCalendar( string $calendarId)

[line 250]

Delete a calendar and all it's objects

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::deleteCalendar()
Delete a calendar and all it's objects

Overrides Sabre_CalDAV_Backend_Abstract::deleteCalendar() (Delete a calendar and all it's objects)

Parameters:

  • string $calendarId -

[ Top ]

deleteCalendarObject

void deleteCalendarObject( string $calendarId, string $objectUri)

[line 333]

Deletes an existing calendar object.

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::deleteCalendarObject()
Deletes an existing calendar object.

Overrides Sabre_CalDAV_Backend_Abstract::deleteCalendarObject() (Deletes an existing calendar object.)

Parameters:

  • string $calendarId -
  • string $objectUri -

[ Top ]

getCalendarObject

array getCalendarObject( string $calendarId, string $objectUri)

[line 284]

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

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::getCalendarObject()
Returns information from a single calendar object, based on it's object uri.

Overrides Sabre_CalDAV_Backend_Abstract::getCalendarObject() (Returns information from a single calendar object, based on it's object uri.)

Parameters:

  • string $calendarId -
  • string $objectUri -

[ Top ]

getCalendarObjects

array getCalendarObjects( string $calendarId)

[line 266]

Returns all calendar objects within a calendar object.

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::getCalendarObjects()
Returns all calendar objects within a calendar object.

Overrides Sabre_CalDAV_Backend_Abstract::getCalendarObjects() (Returns all calendar objects within a calendar object.)

Parameters:

  • string $calendarId -

[ Top ]

getCalendarsForUser

array getCalendarsForUser( $principalUri, string $userUri)

[line 56]

Returns a list of calendars for a principal

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::getCalendarsForUser()
Returns a list of calendars for a principal

Overrides Sabre_CalDAV_Backend_Abstract::getCalendarsForUser() (Returns a list of calendars for a principal)

Parameters:

  • string $userUri -
  • $principalUri -

[ Top ]

updateCalendar

bool|array updateCalendar( string $calendarId, $properties)

[line 185]

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.

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::updateCalendar()
Updates a calendars properties

Overrides Sabre_CalDAV_Backend_Abstract::updateCalendar() (Updates properties on this node,)

Parameters:

  • string $calendarId -
  • array $properties -

[ Top ]

updateCalendarObject

void updateCalendarObject( string $calendarId, string $objectUri, string $calendarData)

[line 317]

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

Tags:

  • access - public

Overridden in child classes as:

Webcal_Sabre_CalDAV_Backend_PDO::updateCalendarObject()
Updates an existing calendarobject, based on it's uri.

Overrides Sabre_CalDAV_Backend_Abstract::updateCalendarObject() (Updates an existing calendarobject, based on it's uri.)

Parameters:

  • string $calendarId -
  • string $objectUri -
  • string $calendarData -

[ Top ]


Class Constants


Documentation generated on Mon, 31 May 2010 12:53:43 -0400 by phpDocumentor 1.4.3