Blame view

sources/3rdparty/sabre/dav/lib/Sabre/DAV/Exception/ConflictingLock.php 1.07 KB
03e52840d   Kload   Init
1
  <?php
6d9380f96   Cédric Dupont   Update sources OC...
2
3
4
  namespace Sabre\DAV\Exception;
  
  use Sabre\DAV;
03e52840d   Kload   Init
5
6
7
  /**
   * ConflictingLock
   *
6d9380f96   Cédric Dupont   Update sources OC...
8
   * Similar to  the Locked exception, this exception thrown when a LOCK request
03e52840d   Kload   Init
9
10
   * was made, on a resource which was already locked
   *
6d9380f96   Cédric Dupont   Update sources OC...
11
12
13
   * @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
   * @author Evert Pot (http://evertpot.com/)
   * @license http://sabre.io/license/ Modified BSD License
03e52840d   Kload   Init
14
   */
6d9380f96   Cédric Dupont   Update sources OC...
15
  class ConflictingLock extends Locked {
03e52840d   Kload   Init
16
17
18
19
  
      /**
       * This method allows the exception to include additional information into the WebDAV error response
       *
6d9380f96   Cédric Dupont   Update sources OC...
20
21
       * @param DAV\Server $server
       * @param \DOMElement $errorNode
03e52840d   Kload   Init
22
23
       * @return void
       */
6d9380f96   Cédric Dupont   Update sources OC...
24
      public function serialize(DAV\Server $server, \DOMElement $errorNode) {
03e52840d   Kload   Init
25
26
27
28
29
30
31
32
33
34
35
  
          if ($this->lock) {
              $error = $errorNode->ownerDocument->createElementNS('DAV:','d:no-conflicting-lock');
              $errorNode->appendChild($error);
              if (!is_object($this->lock)) var_dump($this->lock);
              $error->appendChild($errorNode->ownerDocument->createElementNS('DAV:','d:href',$this->lock->uri));
          }
  
      }
  
  }