aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception')
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/BadResponseException.php69
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ClientErrorResponseException.php8
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CouldNotRewindStreamException.php7
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CurlException.php101
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/HttpException.php10
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/MultiTransferException.php145
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/RequestException.php39
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ServerErrorResponseException.php8
-rw-r--r--apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/TooManyRedirectsException.php5
9 files changed, 0 insertions, 392 deletions
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/BadResponseException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/BadResponseException.php
deleted file mode 100644
index 0ed0b47c254..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/BadResponseException.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-use Guzzle\Http\Message\RequestInterface;
-use Guzzle\Http\Message\Response;
-
-/**
- * Http request exception thrown when a bad response is received
- */
-class BadResponseException extends RequestException
-{
- /** @var Response */
- private $response;
-
- /**
- * Factory method to create a new response exception based on the response code.
- *
- * @param RequestInterface $request Request
- * @param Response $response Response received
- *
- * @return BadResponseException
- */
- public static function factory(RequestInterface $request, Response $response)
- {
- if ($response->isClientError()) {
- $label = 'Client error response';
- $class = __NAMESPACE__ . '\\ClientErrorResponseException';
- } elseif ($response->isServerError()) {
- $label = 'Server error response';
- $class = __NAMESPACE__ . '\\ServerErrorResponseException';
- } else {
- $label = 'Unsuccessful response';
- $class = __CLASS__;
- }
-
- $message = $label . PHP_EOL . implode(PHP_EOL, array(
- '[status code] ' . $response->getStatusCode(),
- '[reason phrase] ' . $response->getReasonPhrase(),
- '[url] ' . $request->getUrl(),
- ));
-
- $e = new $class($message);
- $e->setResponse($response);
- $e->setRequest($request);
-
- return $e;
- }
-
- /**
- * Set the response that caused the exception
- *
- * @param Response $response Response to set
- */
- public function setResponse(Response $response)
- {
- $this->response = $response;
- }
-
- /**
- * Get the response that caused the exception
- *
- * @return Response
- */
- public function getResponse()
- {
- return $this->response;
- }
-}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ClientErrorResponseException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ClientErrorResponseException.php
deleted file mode 100644
index 04d7ddc05ef..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ClientErrorResponseException.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-/**
- * Exception when a client error is encountered (4xx codes)
- */
-class ClientErrorResponseException extends BadResponseException {}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CouldNotRewindStreamException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CouldNotRewindStreamException.php
deleted file mode 100644
index 63e4ec74dec..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CouldNotRewindStreamException.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-use Guzzle\Common\Exception\RuntimeException;
-
-class CouldNotRewindStreamException extends RuntimeException implements HttpException {}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CurlException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CurlException.php
deleted file mode 100644
index a6a744a74bb..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/CurlException.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-use Guzzle\Http\Curl\CurlHandle;
-
-/**
- * cURL request exception
- */
-class CurlException extends RequestException
-{
- private $curlError;
- private $curlErrorNo;
- private $handle;
- private $curlInfo = array();
-
- /**
- * Set the cURL error message
- *
- * @param string $error Curl error
- * @param int $number Curl error number
- *
- * @return self
- */
- public function setError($error, $number)
- {
- $this->curlError = $error;
- $this->curlErrorNo = $number;
-
- return $this;
- }
-
- /**
- * Set the associated curl handle
- *
- * @param CurlHandle $handle Curl handle
- *
- * @return self
- */
- public function setCurlHandle(CurlHandle $handle)
- {
- $this->handle = $handle;
-
- return $this;
- }
-
- /**
- * Get the associated cURL handle
- *
- * @return CurlHandle|null
- */
- public function getCurlHandle()
- {
- return $this->handle;
- }
-
- /**
- * Get the associated cURL error message
- *
- * @return string|null
- */
- public function getError()
- {
- return $this->curlError;
- }
-
- /**
- * Get the associated cURL error number
- *
- * @return int|null
- */
- public function getErrorNo()
- {
- return $this->curlErrorNo;
- }
-
- /**
- * Returns curl information about the transfer
- *
- * @return array
- */
- public function getCurlInfo()
- {
- return $this->curlInfo;
- }
-
- /**
- * Set curl transfer information
- *
- * @param array $info Array of curl transfer information
- *
- * @return self
- * @link http://php.net/manual/en/function.curl-getinfo.php
- */
- public function setCurlInfo(array $info)
- {
- $this->curlInfo = $info;
-
- return $this;
- }
-}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/HttpException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/HttpException.php
deleted file mode 100644
index ee87295d36e..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/HttpException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-use Guzzle\Common\Exception\GuzzleException;
-
-/**
- * Http exception interface
- */
-interface HttpException extends GuzzleException {}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/MultiTransferException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/MultiTransferException.php
deleted file mode 100644
index 91e384daee4..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/MultiTransferException.php
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-use Guzzle\Common\Exception\ExceptionCollection;
-use Guzzle\Http\Message\RequestInterface;
-
-/**
- * Exception encountered during a multi transfer
- */
-class MultiTransferException extends ExceptionCollection
-{
- protected $successfulRequests = array();
- protected $failedRequests = array();
- protected $exceptionForRequest = array();
-
- /**
- * Get all of the requests in the transfer
- *
- * @return array
- */
- public function getAllRequests()
- {
- return array_merge($this->successfulRequests, $this->failedRequests);
- }
-
- /**
- * Add to the array of successful requests
- *
- * @param RequestInterface $request Successful request
- *
- * @return self
- */
- public function addSuccessfulRequest(RequestInterface $request)
- {
- $this->successfulRequests[] = $request;
-
- return $this;
- }
-
- /**
- * Add to the array of failed requests
- *
- * @param RequestInterface $request Failed request
- *
- * @return self
- */
- public function addFailedRequest(RequestInterface $request)
- {
- $this->failedRequests[] = $request;
-
- return $this;
- }
-
- /**
- * Add to the array of failed requests and associate with exceptions
- *
- * @param RequestInterface $request Failed request
- * @param \Exception $exception Exception to add and associate with
- *
- * @return self
- */
- public function addFailedRequestWithException(RequestInterface $request, \Exception $exception)
- {
- $this->add($exception)
- ->addFailedRequest($request)
- ->exceptionForRequest[spl_object_hash($request)] = $exception;
-
- return $this;
- }
-
- /**
- * Get the Exception that caused the given $request to fail
- *
- * @param RequestInterface $request Failed command
- *
- * @return \Exception|null
- */
- public function getExceptionForFailedRequest(RequestInterface $request)
- {
- $oid = spl_object_hash($request);
-
- return isset($this->exceptionForRequest[$oid]) ? $this->exceptionForRequest[$oid] : null;
- }
-
- /**
- * Set all of the successful requests
- *
- * @param array Array of requests
- *
- * @return self
- */
- public function setSuccessfulRequests(array $requests)
- {
- $this->successfulRequests = $requests;
-
- return $this;
- }
-
- /**
- * Set all of the failed requests
- *
- * @param array Array of requests
- *
- * @return self
- */
- public function setFailedRequests(array $requests)
- {
- $this->failedRequests = $requests;
-
- return $this;
- }
-
- /**
- * Get an array of successful requests sent in the multi transfer
- *
- * @return array
- */
- public function getSuccessfulRequests()
- {
- return $this->successfulRequests;
- }
-
- /**
- * Get an array of failed requests sent in the multi transfer
- *
- * @return array
- */
- public function getFailedRequests()
- {
- return $this->failedRequests;
- }
-
- /**
- * Check if the exception object contains a request
- *
- * @param RequestInterface $request Request to check
- *
- * @return bool
- */
- public function containsRequest(RequestInterface $request)
- {
- return in_array($request, $this->failedRequests, true) || in_array($request, $this->successfulRequests, true);
- }
-}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/RequestException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/RequestException.php
deleted file mode 100644
index 274df2cb167..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/RequestException.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-use Guzzle\Common\Exception\RuntimeException;
-use Guzzle\Http\Message\RequestInterface;
-
-/**
- * Http request exception
- */
-class RequestException extends RuntimeException implements HttpException
-{
- /** @var RequestInterface */
- protected $request;
-
- /**
- * Set the request that caused the exception
- *
- * @param RequestInterface $request Request to set
- *
- * @return RequestException
- */
- public function setRequest(RequestInterface $request)
- {
- $this->request = $request;
-
- return $this;
- }
-
- /**
- * Get the request that caused the exception
- *
- * @return RequestInterface
- */
- public function getRequest()
- {
- return $this->request;
- }
-}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ServerErrorResponseException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ServerErrorResponseException.php
deleted file mode 100644
index f0f7cfe4810..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/ServerErrorResponseException.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-/**
- * Exception when a server error is encountered (5xx codes)
- */
-class ServerErrorResponseException extends BadResponseException {}
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/TooManyRedirectsException.php b/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/TooManyRedirectsException.php
deleted file mode 100644
index 2aa43d11d4f..00000000000
--- a/apps/files_external/3rdparty/aws-sdk-php/Guzzle/Http/Exception/TooManyRedirectsException.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-namespace Guzzle\Http\Exception;
-
-class TooManyRedirectsException extends BadResponseException {}