[Pkg-owncloud-commits] [php-sabredav] 17/80: Added a 'minimal server' example.
David Prévot
taffit at moszumanska.debian.org
Thu Jan 7 02:56:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit d48112127774eb0df22f71770cd175565242ed69
Author: Evert Pot <me at evertpot.com>
Date: Tue Oct 20 16:59:33 2015 -0400
Added a 'minimal server' example.
---
examples/minimal.php | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/examples/minimal.php b/examples/minimal.php
new file mode 100644
index 0000000..4ac2560
--- /dev/null
+++ b/examples/minimal.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * This example shows the smallest possible sabre/dav server.
+ */
+include 'vendor/autoload.php';
+
+$server = new Sabre\DAV\Server([
+ new Sabre\DAV\FS\Directory(__DIR__)
+]);
+
+/**
+ * Ok. Perhaps not the smallest possible. The browser plugin is 100% optional,
+ * but it really helps understanding the server.
+ */
+$server->addPlugin(
+ new Sabre\DAV\Browser\Plugin()
+);
+
+$server->exec();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list