6 * Deprecated! Warning: This class is now officially deprecated
8 * This script is a convenience script. It quickly sets up a WebDAV server
9 * with caldav and ACL support, and it creates the root 'principals' and
10 * 'calendars' collections.
12 * Note that if you plan to do anything moderately complex, you are advised to
13 * not subclass this server, but use Sabre_DAV_Server directly instead. This
14 * class is nothing more than an 'easy setup'.
18 * @deprecated Don't use this class anymore, it will be removed in version 1.7.
19 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
20 * @author Evert Pot (http://www.rooftopsolutions.nl/)
21 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
23 class Sabre_CalDAV_Server extends Sabre_DAV_Server {
26 * The authentication realm
28 * Note that if this changes, the hashes in the auth backend must also
33 public $authRealm = 'SabreDAV';
36 * Sets up the object. A PDO object must be passed to setup all the backends.
40 public function __construct(PDO $pdo) {
43 $authBackend = new Sabre_DAV_Auth_Backend_PDO($pdo);
44 $calendarBackend = new Sabre_CalDAV_Backend_PDO($pdo);
45 $principalBackend = new Sabre_DAVACL_PrincipalBackend_PDO($pdo);
47 /* Directory structure */
49 new Sabre_CalDAV_Principal_Collection($principalBackend),
50 new Sabre_CalDAV_CalendarRootNode($principalBackend, $calendarBackend),
53 /* Initializing server */
54 parent::__construct($tree);
57 $authPlugin = new Sabre_DAV_Auth_Plugin($authBackend,$this->authRealm);
58 $this->addPlugin($authPlugin);
60 $aclPlugin = new Sabre_DAVACL_Plugin();
61 $this->addPlugin($aclPlugin);
63 $caldavPlugin = new Sabre_CalDAV_Plugin();
64 $this->addPlugin($caldavPlugin);