4 * Supported-calendar-data property
6 * This property is a representation of the supported-calendar-data property
7 * in the CalDAV namespace. SabreDAV only has support for text/calendar;2.0
8 * so the value is currently hardcoded.
12 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
13 * @author Evert Pot (http://www.rooftopsolutions.nl/)
14 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
16 class Sabre_CalDAV_Property_SupportedCalendarData extends Sabre_DAV_Property {
19 * Serializes the property in a DOMDocument
21 * @param Sabre_DAV_Server $server
22 * @param DOMElement $node
25 public function serialize(Sabre_DAV_Server $server,DOMElement $node) {
27 $doc = $node->ownerDocument;
29 $prefix = isset($server->xmlNamespaces[Sabre_CalDAV_Plugin::NS_CALDAV])?$server->xmlNamespaces[Sabre_CalDAV_Plugin::NS_CALDAV]:'cal';
31 $caldata = $doc->createElement($prefix . ':calendar-data');
32 $caldata->setAttribute('content-type','text/calendar');
33 $caldata->setAttribute('version','2.0');
35 $node->appendChild($caldata);