ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MkCol.php
Go to the documentation of this file.
1<?php
2
4
7
19class MkCol implements XmlDeserializable {
20
26 protected $properties = [];
27
34 function getProperties() {
35
36 return $this->properties;
37
38 }
39
61 static function xmlDeserialize(Reader $reader) {
62
63 $self = new self();
64
65 $elementMap = $reader->elementMap;
66 $elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop';
67 $elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue';
68 $elementMap['{DAV:}remove'] = 'Sabre\Xml\Element\KeyValue';
69
70 $elems = $reader->parseInnerTree($elementMap);
71
72 foreach ($elems as $elem) {
73 if ($elem['name'] === '{DAV:}set') {
74 $self->properties = array_merge($self->properties, $elem['value']['{DAV:}prop']);
75 }
76 }
77
78 return $self;
79
80 }
81
82}
An exception for terminatinating execution or to throw for unit testing.
WebDAV Extended MKCOL request parser.
Definition: MkCol.php:19
getProperties()
Returns a key=>value array with properties that are supposed to get set during creation of the new co...
Definition: MkCol.php:34
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
Definition: MkCol.php:61
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...