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
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}
An exception for terminatinating execution or to throw for unit testing.
PrincipalMatchReport request parser.
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
const SELF
Report on a list of principals that match the current principal.
const PRINCIPAL_PROPERTY
Report on a property on resources, such as {DAV:}owner, that match the current principal.
The Reader class expands upon PHP's built-in XMLReader.
Definition: Reader.php:20
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...
keyValue(Reader $reader, $namespace=null)
This class provides a number of 'deserializer' helper functions.
Definition: functions.php:61