summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Avatars/RootCollection.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-12-23 12:12:38 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-03-29 00:04:29 +0200
commit23aab05bdaaaff8310cad64ff028bc7a53656f5a (patch)
tree740ea5687fab84d77fe622ef236fcac2c9054483 /apps/dav/lib/Avatars/RootCollection.php
parent4821c00ea81797fcb5a99c31105ad42be598f113 (diff)
downloadnextcloud-server-23aab05bdaaaff8310cad64ff028bc7a53656f5a.tar.gz
nextcloud-server-23aab05bdaaaff8310cad64ff028bc7a53656f5a.zip
Adding dav resource for avatars
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/lib/Avatars/RootCollection.php')
-rw-r--r--apps/dav/lib/Avatars/RootCollection.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/dav/lib/Avatars/RootCollection.php b/apps/dav/lib/Avatars/RootCollection.php
new file mode 100644
index 00000000000..8cad3d3721a
--- /dev/null
+++ b/apps/dav/lib/Avatars/RootCollection.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace OCA\DAV\Avatars;
+
+use Sabre\DAVACL\AbstractPrincipalCollection;
+use Sabre\DAVACL\IPrincipal;
+
+class RootCollection extends AbstractPrincipalCollection {
+
+ /**
+ * This method returns a node for a principal.
+ *
+ * The passed array contains principal information, and is guaranteed to
+ * at least contain a uri item. Other properties may or may not be
+ * supplied by the authentication backend.
+ *
+ * @param array $principalInfo
+ * @return IPrincipal
+ */
+ function getChildForPrincipal(array $principalInfo) {
+ return new AvatarHome($principalInfo);
+ }
+
+ function getName() {
+ return 'avatars';
+ }
+
+}