diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-30 21:51:33 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-30 21:51:33 -0400 |
commit | 0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61 (patch) | |
tree | b6684b05aee92729406a90f397ccd446f58863c7 /vendor/sabre/dav/examples/addressbookserver.php | |
parent | 7124c0aee5486aab74272c81ceb3e383b2e3a7f7 (diff) | |
parent | 852b2659e9a71f0542e822aa20efc009e22ff66a (diff) | |
download | volse-hubzilla-0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61.tar.gz volse-hubzilla-0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61.tar.bz2 volse-hubzilla-0fd8eeec23a0613db8ea6c5bb54b4658ddaa0e61.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'vendor/sabre/dav/examples/addressbookserver.php')
-rw-r--r-- | vendor/sabre/dav/examples/addressbookserver.php | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/vendor/sabre/dav/examples/addressbookserver.php b/vendor/sabre/dav/examples/addressbookserver.php deleted file mode 100644 index 6d1c9b26c..000000000 --- a/vendor/sabre/dav/examples/addressbookserver.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - -Addressbook/CardDAV server example - -This server features CardDAV support - -*/ - -// settings -date_default_timezone_set('Canada/Eastern'); - -// Make sure this setting is turned on and reflect the root url for your WebDAV server. -// This can be for example the root / or a complete path to your server script -$baseUri = '/'; - -/* Database */ -$pdo = new PDO('sqlite:data/db.sqlite'); -$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - -//Mapping PHP errors to exceptions -function exception_error_handler($errno, $errstr, $errfile, $errline) { - throw new ErrorException($errstr, 0, $errno, $errfile, $errline); -} -set_error_handler("exception_error_handler"); - -// Autoloader -require_once 'vendor/autoload.php'; - -// Backends -$authBackend = new Sabre\DAV\Auth\Backend\PDO($pdo); -$principalBackend = new Sabre\DAVACL\PrincipalBackend\PDO($pdo); -$carddavBackend = new Sabre\CardDAV\Backend\PDO($pdo); -//$caldavBackend = new Sabre\CalDAV\Backend\PDO($pdo); - -// Setting up the directory tree // -$nodes = [ - new Sabre\DAVACL\PrincipalCollection($principalBackend), -// new Sabre\CalDAV\CalendarRoot($authBackend, $caldavBackend), - new Sabre\CardDAV\AddressBookRoot($principalBackend, $carddavBackend), -]; - -// The object tree needs in turn to be passed to the server class -$server = new Sabre\DAV\Server($nodes); -$server->setBaseUri($baseUri); - -// Plugins -$server->addPlugin(new Sabre\DAV\Auth\Plugin($authBackend)); -$server->addPlugin(new Sabre\DAV\Browser\Plugin()); -//$server->addPlugin(new Sabre\CalDAV\Plugin()); -$server->addPlugin(new Sabre\CardDAV\Plugin()); -$server->addPlugin(new Sabre\DAVACL\Plugin()); -$server->addPlugin(new Sabre\DAV\Sync\Plugin()); - -// And off we go! -$server->exec(); |