]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAV/Exception/ConflictingLock.php
Merge remote branch 'friendica/master'
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAV / Exception / ConflictingLock.php
1 <?php
2
3 /**
4  * ConflictingLock
5  *
6  * Similar to Exception_Locked, this exception thrown when a LOCK request
7  * was made, on a resource which was already locked
8  *
9  * @package Sabre
10  * @subpackage DAV
11  * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
12  * @author Evert Pot (http://www.rooftopsolutions.nl/) 
13  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
14  */
15 class Sabre_DAV_Exception_ConflictingLock extends Sabre_DAV_Exception_Locked {
16
17     /**
18      * This method allows the exception to include additional information into the WebDAV error response
19      *
20      * @param Sabre_DAV_Server $server
21      * @param DOMElement $errorNode
22      * @return void
23      */
24     public function serialize(Sabre_DAV_Server $server,DOMElement $errorNode) {
25
26         if ($this->lock) {
27             $error = $errorNode->ownerDocument->createElementNS('DAV:','d:no-conflicting-lock');
28             $errorNode->appendChild($error);
29             if (!is_object($this->lock)) var_dump($this->lock);
30             $error->appendChild($errorNode->ownerDocument->createElementNS('DAV:','d:href',$this->lock->uri));
31         }
32
33     }
34
35 }