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 --- .../dav/lib/Sabre/DAV/Exception/BadRequest.php | 28 +++++++++ .../sabre/dav/lib/Sabre/DAV/Exception/Conflict.php | 28 +++++++++ .../lib/Sabre/DAV/Exception/ConflictingLock.php | 37 +++++++++++ .../dav/lib/Sabre/DAV/Exception/FileNotFound.php | 19 ++++++ .../dav/lib/Sabre/DAV/Exception/Forbidden.php | 27 ++++++++ .../Sabre/DAV/Exception/InsufficientStorage.php | 27 ++++++++ .../Sabre/DAV/Exception/InvalidResourceType.php | 33 ++++++++++ .../DAV/Exception/LockTokenMatchesRequestUri.php | 41 ++++++++++++ .../sabre/dav/lib/Sabre/DAV/Exception/Locked.php | 73 ++++++++++++++++++++++ .../lib/Sabre/DAV/Exception/MethodNotAllowed.php | 45 +++++++++++++ .../lib/Sabre/DAV/Exception/NotAuthenticated.php | 30 +++++++++ .../sabre/dav/lib/Sabre/DAV/Exception/NotFound.php | 28 +++++++++ .../dav/lib/Sabre/DAV/Exception/NotImplemented.php | 27 ++++++++ .../lib/Sabre/DAV/Exception/PaymentRequired.php | 30 +++++++++ .../lib/Sabre/DAV/Exception/PreconditionFailed.php | 71 +++++++++++++++++++++ .../lib/Sabre/DAV/Exception/ReportNotSupported.php | 32 ++++++++++ .../DAV/Exception/RequestedRangeNotSatisfiable.php | 31 +++++++++ .../lib/Sabre/DAV/Exception/ServiceUnavailable.php | 30 +++++++++ .../Sabre/DAV/Exception/UnsupportedMediaType.php | 28 +++++++++ 19 files changed, 665 insertions(+) create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/BadRequest.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/Conflict.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/ConflictingLock.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/FileNotFound.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/Forbidden.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/InsufficientStorage.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/InvalidResourceType.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/Locked.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/MethodNotAllowed.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/NotAuthenticated.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/NotFound.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/NotImplemented.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/PaymentRequired.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/PreconditionFailed.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/ReportNotSupported.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/ServiceUnavailable.php create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Exception/UnsupportedMediaType.php (limited to 'vendor/sabre/dav/lib/Sabre/DAV/Exception') diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/BadRequest.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/BadRequest.php new file mode 100644 index 000000000..bcf4c8eb4 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/BadRequest.php @@ -0,0 +1,28 @@ +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)); + } + + } + +} diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/FileNotFound.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/FileNotFound.php new file mode 100644 index 000000000..da700ebb0 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/FileNotFound.php @@ -0,0 +1,19 @@ +ownerDocument->createElementNS('DAV:','d:valid-resourcetype'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php new file mode 100644 index 000000000..a8f8407f0 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php @@ -0,0 +1,41 @@ +message = 'The locktoken supplied does not match any locks on this entity'; + + } + + /** + * 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) { + + $error = $errorNode->ownerDocument->createElementNS('DAV:','d:lock-token-matches-request-uri'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/Locked.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/Locked.php new file mode 100644 index 000000000..2f8460be2 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/Locked.php @@ -0,0 +1,73 @@ +lock = $lock; + + } + + /** + * Returns the HTTP statuscode for this exception + * + * @return int + */ + public function getHTTPCode() { + + return 423; + + } + + /** + * 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->lock) { + $error = $errorNode->ownerDocument->createElementNS('DAV:','d:lock-token-submitted'); + $errorNode->appendChild($error); + + $href = $errorNode->ownerDocument->createElementNS('DAV:','d:href'); + $href->appendChild($errorNode->ownerDocument->createTextNode($this->lock->uri)); + $error->appendChild( + $href + ); + } + + } + +} + diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/MethodNotAllowed.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/MethodNotAllowed.php new file mode 100644 index 000000000..09aeca4c8 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/MethodNotAllowed.php @@ -0,0 +1,45 @@ +getAllowedMethods($server->getRequestUri()); + + return array( + 'Allow' => strtoupper(implode(', ',$methods)), + ); + + } + +} diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/NotAuthenticated.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/NotAuthenticated.php new file mode 100644 index 000000000..695edda15 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/NotAuthenticated.php @@ -0,0 +1,30 @@ +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); + } + + } + +} diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/ReportNotSupported.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/ReportNotSupported.php new file mode 100644 index 000000000..d55c99bd0 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/ReportNotSupported.php @@ -0,0 +1,32 @@ +ownerDocument->createElementNS('DAV:','d:supported-report'); + $errorNode->appendChild($error); + + } + +} diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php new file mode 100644 index 000000000..0a8a85808 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php @@ -0,0 +1,31 @@ + + * @copyright Copyright (C) 2007-2013 fruux GmbH (https://fruux.com/). + * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License + */ +class ServiceUnavailable extends DAV\Exception { + + /** + * Returns the HTTP statuscode for this exception + * + * @return int + */ + public function getHTTPCode() { + + return 503; + + } + +} diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Exception/UnsupportedMediaType.php b/vendor/sabre/dav/lib/Sabre/DAV/Exception/UnsupportedMediaType.php new file mode 100644 index 000000000..38f5a9fac --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Exception/UnsupportedMediaType.php @@ -0,0 +1,28 @@ +