1<?php 2 3namespace Sabre\DAVACL\Exception; 4 5use Sabre\DAV; 6 7/** 8 * This exception is thrown when a user tries to set a privilege that's marked 9 * as abstract. 10 * 11 * @copyright Copyright (C) fruux GmbH (https://fruux.com/) 12 * @author Evert Pot (http://evertpot.com/) 13 * @license http://sabre.io/license/ Modified BSD License 14 */ 15class NoAbstract extends DAV\Exception\PreconditionFailed { 16 17 /** 18 * Adds in extra information in the xml response. 19 * 20 * This method adds the {DAV:}no-abstract element as defined in rfc3744 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('DAV:', 'd:no-abstract'); 31 $errorNode->appendChild($np); 32 33 } 34 35} 36