88 '{urn:ietf:params:xml:ns:caldav}comp-filter' =>
'Sabre\\CalDAV\\Xml\\Filter\\CompFilter',
89 '{urn:ietf:params:xml:ns:caldav}prop-filter' =>
'Sabre\\CalDAV\\Xml\\Filter\\PropFilter',
90 '{urn:ietf:params:xml:ns:caldav}param-filter' =>
'Sabre\\CalDAV\\Xml\\Filter\\ParamFilter',
91 '{urn:ietf:params:xml:ns:caldav}calendar-data' =>
'Sabre\\CalDAV\\Xml\\Filter\\CalendarData',
92 '{DAV:}prop' =>
'Sabre\\Xml\\Element\\KeyValue',
100 if (!is_array($elems)) $elems = [];
102 foreach ($elems as $elem) {
104 switch ($elem[
'name']) {
107 $newProps[
'properties'] = array_keys($elem[
'value']);
109 $newProps += $elem[
'value'][
'{' . Plugin::NS_CALDAV .
'}calendar-data'];
112 case '{' . Plugin::NS_CALDAV .
'}filter' :
113 foreach ($elem[
'value'] as $subElem) {
114 if ($subElem[
'name'] ===
'{' . Plugin::NS_CALDAV .
'}comp-filter') {
115 if (!is_null($newProps[
'filters'])) {
116 throw new BadRequest(
'Only one top-level comp-filter may be defined');
118 $newProps[
'filters'] = $subElem[
'value'];
127 if (is_null($newProps[
'filters'])) {
132 foreach ($newProps as
$key => $value) {
parseInnerTree(array $elementMap=null)
Parses all elements below the current element.
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
The Reader class expands upon PHP's built-in XMLReader.
Implementing the XmlDeserializable interface allows you to use a class as a deserializer for a specif...
CalendarQueryReport request parser.
const NS_CALDAV
This is the official CalDAV namespace.