From aab9766c53e42c3141d0497fce78977d262efbc1 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 29 May 2016 00:33:28 +0200 Subject: missed some files --- vendor/sabre/dav/examples/addressbookserver.php | 57 ------------------------- 1 file changed, 57 deletions(-) delete mode 100644 vendor/sabre/dav/examples/addressbookserver.php (limited to 'vendor/sabre/dav/examples/addressbookserver.php') 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 @@ -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(); -- cgit v1.2.3