From b35122f7a6ad42756c35bb60ba1f06c3dcd45c77 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 21 Oct 2013 15:46:31 -0700 Subject: add sabre (1.8.x) via composer in the !@#$ place it wants to be --- .../lib/Sabre/DAV/Exception/PreconditionFailed.php | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/PreconditionFailed.php (limited to 'vendor/sabre/dav/lib/Sabre/DAV/Exception/PreconditionFailed.php') diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/PreconditionFailed.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/PreconditionFailed.php new file mode 100644 index 000000000..225b99a36 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/PreconditionFailed.php @@ -0,0 +1,71 @@ +header = $header; + + } + + /** + * Returns the HTTP statuscode for this exception + * + * @return int + */ + public function getHTTPCode() { + + return 412; + + } + + /** + * 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->header) { + $prop = $errorNode->ownerDocument->createElement('s:header'); + $prop->nodeValue = $this->header; + $errorNode->appendChild($prop); + } + + } + +} -- cgit v1.2.3