ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PreconditionFailed.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\DAV\Exception;
4
5use Sabre\DAV;
6
19
28 public $header = null;
29
36 function __construct($message, $header = null) {
37
38 parent::__construct($message);
39 $this->header = $header;
40
41 }
42
48 function getHTTPCode() {
49
50 return 412;
51
52 }
53
61 function serialize(DAV\Server $server, \DOMElement $errorNode) {
62
63 if ($this->header) {
64 $prop = $errorNode->ownerDocument->createElement('s:header');
65 $prop->nodeValue = $this->header;
66 $errorNode->appendChild($prop);
67 }
68
69 }
70
71}
An exception for terminatinating execution or to throw for unit testing.
getHTTPCode()
Returns the HTTP statuscode for this exception.
__construct($message, $header=null)
Create the exception.
serialize(DAV\Server $server, \DOMElement $errorNode)
This method allows the exception to include additional information into the WebDAV error response.
Main Exception class.
Definition: Exception.php:18
Main DAV server class.
Definition: Server.php:23
catch(Exception $e) $message
$server
Definition: sabredav.php:48