6 * The 423 is thrown when a client tried to access a resource that was locked, without supplying a valid lock token
10 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
11 * @author Evert Pot (http://www.rooftopsolutions.nl/)
12 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
14 class Sabre_DAV_Exception_Locked extends Sabre_DAV_Exception {
19 * @var Sabre_DAV_Locks_LockInfo
24 * Creates the exception
26 * A LockInfo object should be passed if the user should be informed
27 * which lock actually has the file locked.
29 * @param Sabre_DAV_Locks_LockInfo $lock
31 public function __construct(Sabre_DAV_Locks_LockInfo $lock = null) {
38 * Returns the HTTP statuscode for this exception
42 public function getHTTPCode() {
49 * This method allows the exception to include additional information into the WebDAV error response
51 * @param Sabre_DAV_Server $server
52 * @param DOMElement $errorNode
55 public function serialize(Sabre_DAV_Server $server,DOMElement $errorNode) {
58 $error = $errorNode->ownerDocument->createElementNS('DAV:','d:lock-token-submitted');
59 $errorNode->appendChild($error);
60 if (!is_object($this->lock)) var_dump($this->lock);
61 $error->appendChild($errorNode->ownerDocument->createElementNS('DAV:','d:href',$this->lock->uri));