153 foreach ($required as $item) {
154 if (!isset($values[$item])) {
155 throw new \InvalidArgumentException($item .
' is a required constructor option');
159 foreach ($values as
$key => $value) {
160 if (!property_exists($this,
$key)) {
161 throw new \InvalidArgumentException(
'Unknown option: ' .
$key);
163 $this->
$key = $value;
204 $this->dtStamp->setTimezone(
new \DateTimezone(
'GMT'));
205 $writer->
writeElement($cs .
'dtstamp', $this->dtStamp->format(
'Ymd\\THis\\Z'));
212 switch ($this->type) {
224 '{DAV:}href' => $writer->contextUri . $this->hostUrl
227 if ($this->summary) {
232 if ($this->readOnly) {
237 $writer->endElement();
242 if (strtolower(substr($this->organizer, 0, 7)) ===
'mailto:') {
245 $writer->
writeElement(
'{DAV:}href', $writer->contextUri . $this->organizer);
247 if ($this->commonName) {
248 $writer->
writeElement($cs .
'common-name', $this->commonName);
250 if ($this->firstName) {
251 $writer->
writeElement($cs .
'first-name', $this->firstName);
253 if ($this->lastName) {
254 $writer->
writeElement($cs .
'last-name', $this->lastName);
256 $writer->endElement();
258 if ($this->commonName) {
259 $writer->
writeElement($cs .
'organizer-cn', $this->commonName);
261 if ($this->firstName) {
262 $writer->
writeElement($cs .
'organizer-first', $this->firstName);
264 if ($this->lastName) {
265 $writer->
writeElement($cs .
'organizer-last', $this->lastName);
267 if ($this->supportedComponents) {
271 $writer->endElement();
getId()
Returns a unique id for this notification.
This interface reflects a single notification type.
startElement($name)
Opens a new element.
This class represents the cs:invite-notification notification element.
const NS_CALENDARSERVER
This is the namespace for the proprietary calendarserver extensions.
xmlSerialize(Writer $writer)
The xmlSerialize method is called during xml writing.
__construct(array $values)
Creates the Invite notification.
xmlSerializeFull(Writer $writer)
This method serializes the entire notification, as it is used in the response body.
const NS_CALDAV
This is the official CalDAV namespace.
writeElement($name, $content=null)
Write a full element tag and it's contents.
getETag()
Returns the ETag for this notification.