ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PrincipalMatchReport.php
Go to the documentation of this file.
1 <?php
2 
4 
8 
22 
26  const SELF = 1;
27 
31  const PRINCIPAL_PROPERTY = 2;
32 
38  public $type;
39 
45  public $properties = [];
46 
54 
76  static function xmlDeserialize(Reader $reader) {
77 
78  $reader->pushContext();
79  $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Deserializer\enum';
80 
81  $elems = Deserializer\keyValue(
82  $reader,
83  'DAV:'
84  );
85 
86  $reader->popContext();
87 
88  $principalMatch = new self();
89 
90  if (array_key_exists('self', $elems)) {
91  $principalMatch->type = self::SELF;
92  }
93 
94  if (array_key_exists('principal-property', $elems)) {
95  $principalMatch->type = self::PRINCIPAL_PROPERTY;
96  $principalMatch->principalProperty = $elems['principal-property'][0]['name'];
97  }
98 
99  if (!empty($elems['prop'])) {
100  $principalMatch->properties = $elems['prop'];
101  }
102 
103  return $principalMatch;
104 
105  }
106 
107 }
keyValue(Reader $reader, $namespace=null)
This class provides a number of &#39;deserializer&#39; helper functions.
Definition: functions.php:61
The Reader class expands upon PHP&#39;s built-in XMLReader.
Definition: Reader.php:20
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
const PRINCIPAL_PROPERTY
Report on a property on resources, such as {DAV:}owner, that match the current principal.
PrincipalMatchReport request parser.
const SELF
Report on a list of principals that match the current principal.