ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ShareResource.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAV\Xml\Request;
4 
8 
20 class ShareResource implements XmlDeserializable {
21 
27  public $sharees = [];
28 
34  function __construct(array $sharees) {
35 
36  $this->sharees = $sharees;
37 
38  }
39 
61  static function xmlDeserialize(Reader $reader) {
62 
63  $elems = $reader->parseInnerTree([
64  '{DAV:}sharee' => 'Sabre\DAV\Xml\Element\Sharee',
65  '{DAV:}share-access' => 'Sabre\DAV\Xml\Property\ShareAccess',
66  '{DAV:}prop' => 'Sabre\Xml\Deserializer\keyValue',
67  ]);
68 
69  $sharees = [];
70 
71  foreach ($elems as $elem) {
72  if ($elem['name'] !== '{DAV:}sharee') continue;
73  $sharees[] = $elem['value'];
74 
75  }
76 
77  return new self($sharees);
78 
79  }
80 
81 }
parseInnerTree(array $elementMap=null)
Parses all elements below the current element.
Definition: Reader.php:129
__construct(array $sharees)
Constructor.
The Reader class expands upon PHP&#39;s built-in XMLReader.
Definition: Reader.php:20
ShareResource request parser.
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...