ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
InviteReply.php
Go to the documentation of this file.
1<?php
2
4
7use Sabre\DAV;
12
25
33 public $href;
34
41
47 public $inReplyTo;
48
54 public $summary;
55
61 public $status;
62
73
74 $this->href = $href;
75 $this->calendarUri = $calendarUri;
76 $this->inReplyTo = $inReplyTo;
77 $this->summary = $summary;
78 $this->status = $status;
79
80 }
81
103 static function xmlDeserialize(Reader $reader) {
104
106
107 $href = null;
108 $calendarUri = null;
109 $inReplyTo = null;
110 $summary = null;
111 $status = null;
112
113 foreach ($elems as $name => $value) {
114
115 switch ($name) {
116
117 case '{' . Plugin::NS_CALENDARSERVER . '}hosturl' :
118 foreach ($value as $bla) {
119 if ($bla['name'] === '{DAV:}href') {
120 $calendarUri = $bla['value'];
121 }
122 }
123 break;
124 case '{' . Plugin::NS_CALENDARSERVER . '}invite-accepted' :
126 break;
127 case '{' . Plugin::NS_CALENDARSERVER . '}invite-declined' :
129 break;
130 case '{' . Plugin::NS_CALENDARSERVER . '}in-reply-to' :
131 $inReplyTo = $value;
132 break;
133 case '{' . Plugin::NS_CALENDARSERVER . '}summary' :
134 $summary = $value;
135 break;
136 case '{DAV:}href' :
137 $href = $value;
138 break;
139 }
140
141 }
142 if (is_null($calendarUri)) {
143 throw new BadRequest('The {http://calendarserver.org/ns/}hosturl/{DAV:}href element must exist');
144 }
145
146 return new self($href, $calendarUri, $inReplyTo, $summary, $status);
147
148 }
149
150}
An exception for terminatinating execution or to throw for unit testing.
CalDAV plugin.
Definition: Plugin.php:28
const NS_CALENDARSERVER
This is the namespace for the proprietary calendarserver extensions.
Definition: Plugin.php:38
This plugin implements support for caldav sharing.
Invite-reply POST request parser.
Definition: InviteReply.php:24
__construct($href, $calendarUri, $inReplyTo, $summary, $status)
Constructor.
Definition: InviteReply.php:72
static xmlDeserialize(Reader $reader)
The deserialize method is called during xml parsing.
'KeyValue' parses out all child elements from a single node, and outputs a key=>value struct.
Definition: KeyValue.php:36
static xmlDeserialize(Xml\Reader $reader)
The deserialize method is called during xml parsing.
Definition: KeyValue.php:102
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...