1<?php
2
3namespace Sabre\CalDAV\Exception;
4
5use Sabre\DAV;
6use Sabre\CalDAV;
7
8/**
9 * InvalidComponentType
10 *
11 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
12 * @author Evert Pot (http://evertpot.com/)
13 * @license http://sabre.io/license/ Modified BSD License
14 */
15class InvalidComponentType extends DAV\Exception\Forbidden {
16
17    /**
18     * Adds in extra information in the xml response.
19     *
20     * This method adds the {CALDAV:}supported-calendar-component as defined in rfc4791
21     *
22     * @param DAV\Server $server
23     * @param \DOMElement $errorNode
24     * @return void
25     */
26    function serialize(DAV\Server $server, \DOMElement $errorNode) {
27
28        $doc = $errorNode->ownerDocument;
29
30        $np = $doc->createElementNS(CalDAV\Plugin::NS_CALDAV, 'cal:supported-calendar-component');
31        $errorNode->appendChild($np);
32
33    }
34
35}
36