ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MkCalendar.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
19 class MkCalendar implements XmlDeserializable {
20 
26  public $properties = [];
27 
33  function getProperties() {
34 
35  return $this->properties;
36 
37  }
38 
60  static function xmlDeserialize(Reader $reader) {
61 
62  $self = new self();
63 
64  $elementMap = $reader->elementMap;
65  $elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop';
66  $elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue';
67  $elems = $reader->parseInnerTree($elementMap);
68 
69  foreach ($elems as $elem) {
70  if ($elem['name'] === '{DAV:}set') {
71  $self->properties = array_merge($self->properties, $elem['value']['{DAV:}prop']);
72  }
73  }
74 
75  return $self;
76 
77  }
78 
79 }
parseInnerTree(array $elementMap=null)
Parses all elements below the current element.
Definition: Reader.php:129
getProperties()
Returns the list of properties the calendar will be initialized with.
Definition: MkCalendar.php:33
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
Definition: MkCalendar.php:60
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...