[Pkg-owncloud-commits] [php-sabredav] 173/220: Added more docs to principal-match

David Prévot taffit at moszumanska.debian.org
Thu May 12 01:21:24 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 f47a3d03a5b9db28c10b846bcc56075b3df3488d
Author: Evert Pot <me at evertpot.com>
Date:   Wed Apr 20 10:52:48 2016 +0800

    Added more docs to principal-match
---
 lib/DAVACL/Xml/Request/PrincipalMatchReport.php | 27 ++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/lib/DAVACL/Xml/Request/PrincipalMatchReport.php b/lib/DAVACL/Xml/Request/PrincipalMatchReport.php
index d5710ca..5c4e881 100644
--- a/lib/DAVACL/Xml/Request/PrincipalMatchReport.php
+++ b/lib/DAVACL/Xml/Request/PrincipalMatchReport.php
@@ -20,13 +20,36 @@ use Sabre\Xml\Deserializer;
  */
 class PrincipalMatchReport implements XmlDeserializable {
 
+    /**
+     * Report on a list of principals that match the current principal.
+     */
     const SELF = 1;
+
+    /**
+     * Report on a property on resources, such as {DAV:}owner, that match the current principal.
+     */
     const PRINCIPAL_PROPERTY = 2;
 
+    /**
+     * Must be SELF or PRINCIPAL_PROPERTY
+     *
+     * @var int
+     */
     public $type;
 
+    /**
+     * List of properties that are being requested for matching resources.
+     *
+     * @var string[]
+     */
     public $properties = [];
 
+    /**
+     * If $type = PRINCIPAL_PROPERTY, which WebDAV property we should compare
+     * to the current principal.
+     *
+     * @var string
+     */
     public $principalProperty;
 
     /**
@@ -51,7 +74,7 @@ class PrincipalMatchReport implements XmlDeserializable {
      * @return mixed
      */
     static function xmlDeserialize(Reader $reader) {
-        
+
         $reader->pushContext();
         $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Deserializer\enum';
 
@@ -64,8 +87,6 @@ class PrincipalMatchReport implements XmlDeserializable {
 
         $principalMatch = new self();
 
-        $principalMatch->type = 'carrot';
-
         if (array_key_exists('self', $elems)) {
             $principalMatch->type = self::SELF;
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list