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