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