ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\Exception\Locked Class Reference

Locked. More...

+ Inheritance diagram for Sabre\DAV\Exception\Locked:
+ Collaboration diagram for Sabre\DAV\Exception\Locked:

Public Member Functions

 __construct (DAV\Locks\LockInfo $lock=null)
 Creates the exception. More...
 
 getHTTPCode ()
 Returns the HTTP statuscode for this exception. More...
 
 serialize (DAV\Server $server, \DOMElement $errorNode)
 This method allows the exception to include additional information into the WebDAV error response. More...
 
- Public Member Functions inherited from Sabre\DAV\Exception
 getHTTPCode ()
 Returns the HTTP statuscode for this exception. More...
 
 serialize (Server $server, \DOMElement $errorNode)
 This method allows the exception to include additional information into the WebDAV error response. More...
 
 getHTTPHeaders (Server $server)
 This method allows the exception to return any extra HTTP response headers. More...
 

Protected Attributes

 $lock
 

Detailed Description

Locked.

The 423 is thrown when a client tried to access a resource that was locked, without supplying a valid lock token

Author
Evert Pot (http://evertpot.com/) @license http://sabre.io/license/ Modified BSD License

Definition at line 16 of file Locked.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\DAV\Exception\Locked::__construct ( DAV\Locks\LockInfo  $lock = null)

Creates the exception.

A LockInfo object should be passed if the user should be informed which lock actually has the file locked.

Parameters
DAV\Locks\LockInfo$lock

Definition at line 33 of file Locked.php.

33 {
34
35 $this->lock = $lock;
36
37 }

References Sabre\DAV\Exception\Locked\$lock.

Member Function Documentation

◆ getHTTPCode()

Sabre\DAV\Exception\Locked::getHTTPCode ( )

Returns the HTTP statuscode for this exception.

Returns
int

Reimplemented from Sabre\DAV\Exception.

Definition at line 44 of file Locked.php.

44 {
45
46 return 423;
47
48 }

◆ serialize()

Sabre\DAV\Exception\Locked::serialize ( DAV\Server  $server,
\DOMElement  $errorNode 
)

This method allows the exception to include additional information into the WebDAV error response.

Parameters
DAV\Server$server
\DOMElement$errorNode
Returns
void

Reimplemented in Sabre\DAV\Exception\ConflictingLock.

Definition at line 57 of file Locked.php.

57 {
58
59 if ($this->lock) {
60 $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-submitted');
61 $errorNode->appendChild($error);
62
63 $href = $errorNode->ownerDocument->createElementNS('DAV:', 'd:href');
64 $href->appendChild($errorNode->ownerDocument->createTextNode($this->lock->uri));
65 $error->appendChild(
66 $href
67 );
68 }
69
70 }

Field Documentation

◆ $lock

Sabre\DAV\Exception\Locked::$lock
protected

Definition at line 23 of file Locked.php.

Referenced by Sabre\DAV\Exception\Locked\__construct().


The documentation for this class was generated from the following file: