lock = $lock; } /** * Returns the HTTP statuscode for this exception * * @return int */ public function getHTTPCode() { return 423; } /** * This method allows the exception to include additional information into the WebDAV error response * * @param DAV\Server $server * @param \DOMElement $errorNode * @return void */ public function serialize(DAV\Server $server,\DOMElement $errorNode) { if ($this->lock) { $error = $errorNode->ownerDocument->createElementNS('DAV:','d:lock-token-submitted'); $errorNode->appendChild($error); $href = $errorNode->ownerDocument->createElementNS('DAV:','d:href'); $href->appendChild($errorNode->ownerDocument->createTextNode($this->lock->uri)); $error->appendChild( $href ); } } }