ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SupportedCalendarData.php
Go to the documentation of this file.
1<?php
2
4
8
24
44 function xmlSerialize(Writer $writer) {
45
46 $writer->startElement('{' . Plugin::NS_CALDAV . '}calendar-data');
47 $writer->writeAttributes([
48 'content-type' => 'text/calendar',
49 'version' => '2.0',
50 ]);
51 $writer->endElement(); // calendar-data
52 $writer->startElement('{' . Plugin::NS_CALDAV . '}calendar-data');
53 $writer->writeAttributes([
54 'content-type' => 'application/calendar+json',
55 ]);
56 $writer->endElement(); // calendar-data
57
58 }
59
60}
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
xmlSerialize(Writer $writer)
The xmlSerialize method is called during xml writing.
The XML Writer class.
Definition: Writer.php:31
startElement($name)
Opens a new element.
Definition: Writer.php:121
writeAttributes(array $attributes)
Writes a list of attributes.
Definition: Writer.php:211
Objects implementing XmlSerializable can control how they are represented in Xml.