ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
CalendarMultiGetReport.php
Go to the documentation of this file.
1<?php
2
4
6use Sabre\Uri;
9
23
30
36 public $hrefs;
37
46 public $expand = null;
47
54 public $contentType = null;
55
62 public $version = null;
63
85 static function xmlDeserialize(Reader $reader) {
86
87 $elems = $reader->parseInnerTree([
88 '{urn:ietf:params:xml:ns:caldav}calendar-data' => 'Sabre\\CalDAV\\Xml\\Filter\\CalendarData',
89 '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
90 ]);
91
92 $newProps = [
93 'hrefs' => [],
94 'properties' => [],
95 ];
96
97 foreach ($elems as $elem) {
98
99 switch ($elem['name']) {
100
101 case '{DAV:}prop' :
102 $newProps['properties'] = array_keys($elem['value']);
103 if (isset($elem['value']['{' . Plugin::NS_CALDAV . '}calendar-data'])) {
104 $newProps += $elem['value']['{' . Plugin::NS_CALDAV . '}calendar-data'];
105 }
106 break;
107 case '{DAV:}href' :
108 $newProps['hrefs'][] = Uri\resolve($reader->contextUri, $elem['value']);
109 break;
110
111 }
112
113 }
114
115 $obj = new self();
116 foreach ($newProps as $key => $value) {
117 $obj->$key = $value;
118 }
119
120 return $obj;
121
122 }
123
124}
An exception for terminatinating execution or to throw for unit testing.
CalDAV plugin.
Definition: Plugin.php:28
const NS_CALDAV
This is the official CalDAV namespace.
Definition: Plugin.php:33
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
The Reader class expands upon PHP's built-in XMLReader.
Definition: Reader.php:20
$key
Definition: croninfo.php:18
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...
resolve($basePath, $newPath)
This file contains all the uri handling functions.
Definition: functions.php:23