/** * Serializes the property in a DOM document * * @param Sabre_DAV_Server $server * @param DOMElement $node * @return void */ public function serialize(Sabre_DAV_Server $server, DOMElement $node) { $doc = $node->ownerDocument; $prefix = $node->lookupPrefix('urn:ietf:params:xml:ns:caldav'); if (!$prefix) { $prefix = 'cal'; } $node->appendChild($doc->createElement($prefix . ':supported-collation', 'i;ascii-casemap')); $node->appendChild($doc->createElement($prefix . ':supported-collation', 'i;octet')); }
private function setAttributeOnNode(\DOMElement $node, $name, $value, $namespace = null) { if (null !== $namespace) { if (!($prefix = $node->lookupPrefix($namespace))) { $prefix = 'ns-' . substr(sha1($namespace), 0, 8); } $node->setAttributeNS($namespace, $prefix . ':' . $name, $value); } else { $node->setAttribute($name, $value); } }
public function lookupPrefix($sNamespace) { return parent::lookupPrefix($sNamespace); }