1<?php 2 3namespace Sabre\DAV\Exception; 4 5/** 6 * InvalidResourceType 7 * 8 * This exception is thrown when the user tried to create a new collection, with 9 * a special resourcetype value that was not recognized by the server. 10 * 11 * See RFC5689 section 3.3 12 * 13 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/). 14 * @author Evert Pot (http://evertpot.com/) 15 * @license http://sabre.io/license/ Modified BSD License 16 */ 17class InvalidResourceType extends Forbidden { 18 19 /** 20 * This method allows the exception to include additional information into the WebDAV error response 21 * 22 * @param DAV\Server $server 23 * @param \DOMElement $errorNode 24 * @return void 25 */ 26 function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) { 27 28 $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:valid-resourcetype'); 29 $errorNode->appendChild($error); 30 31 } 32 33} 34