1<?php 2 3namespace Sabre\DAV\Exception; 4 5use Sabre\DAV; 6 7/** 8 * LockTokenMatchesRequestUri 9 * 10 * This exception is thrown by UNLOCK if a supplied lock-token is invalid 11 * 12 * @copyright Copyright (C) fruux GmbH (https://fruux.com/) 13 * @author Evert Pot (http://evertpot.com/) 14 * @license http://sabre.io/license/ Modified BSD License 15 */ 16class LockTokenMatchesRequestUri extends Conflict { 17 18 /** 19 * Creates the exception 20 */ 21 function __construct() { 22 23 $this->message = 'The locktoken supplied does not match any locks on this entity'; 24 25 } 26 27 /** 28 * This method allows the exception to include additional information into the WebDAV error response 29 * 30 * @param DAV\Server $server 31 * @param \DOMElement $errorNode 32 * @return void 33 */ 34 function serialize(DAV\Server $server, \DOMElement $errorNode) { 35 36 $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-matches-request-uri'); 37 $errorNode->appendChild($error); 38 39 } 40 41} 42