Incomplete installationDependencies have not been installed.'); } require 'vendor/autoload.php'; require PATH.'lib/JSONDB.php'; require PATH.'lib/Helpers.php'; require PATH.'lib/UserManager.php'; require PATH.'lib/GenericCollectionManager.php'; require PATH.'lib/AddressbookCollectionManager.php'; require PATH.'lib/CalendarCollectionManager.php'; require PATH.'lib/Sabre/SabrePrincipalJsonBackend.php'; require PATH.'lib/Sabre/SabreAuthenticationJsonBackend.php'; require PATH.'lib/Sabre/SabrePropertyStorageJsonBackend.php'; require PATH.'lib/Sabre/SabreCardDAVJsonBackend.php'; require PATH.'lib/Sabre/SabreCalDAVJsonBackend.php'; require PATH.'lib/Sabre/FilesPlugin.php'; $db = new JSONDB(PATH.'/data'); $userMgr = new UserManager($db); $cardMgr = new AddressbookCollectionManager($db); $calMgr = new CalendarCollectionManager($db); $authBackend = new SabreAuthenticationJsonBackend($userMgr); $propertyStorageBackend = new SabrePropertyStorageJsonBackend($db); $principalBackend = new SabrePrincipalJsonBackend($userMgr); $cardDavBackend = new SabreCardDAVJsonBackend($cardMgr); $calDavBackend = new SabreCalDAVJsonBackend($calMgr); $server = new Sabre\DAV\Server([ new Sabre\DAVACL\PrincipalCollection($principalBackend), //CardDAV-Sever new Sabre\CardDAV\AddressBookRoot($principalBackend, $cardDavBackend), //CalDAV-Server new Sabre\CalDAV\CalendarRoot($principalBackend, $calDavBackend), //WebDAV-Server new FilesPlugin\FilesCollection($principalBackend, PATH.'data/files/'), ]); $server->setBaseUri('/dav/'); $server->addPlugin(new Sabre\DAV\Auth\Plugin($authBackend, 'tinyDAV')); $server->addPlugin(new Sabre\DAVACL\Plugin()); $server->addPlugin(new Sabre\DAV\PropertyStorage\Plugin($propertyStorageBackend)); $server->addPlugin(new Sabre\DAV\Sync\Plugin()); //CardDAV-Server $server->addPlugin(new Sabre\CardDAV\Plugin()); $server->addPlugin(new Sabre\CardDAV\VCFExportPlugin()); //CalDAV-Server $server->addPlugin(new Sabre\CalDAV\Plugin()); $server->addPlugin(new Sabre\CalDAV\ICSExportPlugin()); $server->addPlugin(new Sabre\CalDAV\Schedule\Plugin()); //WebDAV-Server $server->addPlugin(new FilesPlugin\Plugin(PATH.'data/files/')); //Fancy Web $server->addPlugin(new Sabre\DAV\Browser\Plugin()); $server->exec();