summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
diff options
context:
space:
mode:
authorEoleDev <EoleDev@outlook.fr>2016-04-14 16:24:44 +0200
committerEoleDev <EoleDev@outlook.fr>2016-04-14 16:24:44 +0200
commit24bb5fefbdf93ce0969b7f56cc46c459ebb82a95 (patch)
tree531fc8b774c035040774234efba780a3d4fe9242 /server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
parent646af6fd4d14c5b5edb1372e5f68ed9bdc35b3d2 (diff)
Mise a jour et nettoyage depot
Diffstat (limited to 'server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php')
-rw-r--r--server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php55
1 files changed, 0 insertions, 55 deletions
diff --git a/server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
deleted file mode 100644
index f8b00be..0000000
--- a/server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-namespace GuzzleHttp\Handler;
-
-use GuzzleHttp\RequestOptions;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * Provides basic proxies for handlers.
- */
-class Proxy
-{
- /**
- * Sends synchronous requests to a specific handler while sending all other
- * requests to another handler.
- *
- * @param callable $default Handler used for normal responses
- * @param callable $sync Handler used for synchronous responses.
- *
- * @return callable Returns the composed handler.
- */
- public static function wrapSync(
- callable $default,
- callable $sync
- ) {
- return function (RequestInterface $request, array $options) use ($default, $sync) {
- return empty($options[RequestOptions::SYNCHRONOUS])
- ? $default($request, $options)
- : $sync($request, $options);
- };
- }
-
- /**
- * Sends streaming requests to a streaming compatible handler while sending
- * all other requests to a default handler.
- *
- * This, for example, could be useful for taking advantage of the
- * performance benefits of curl while still supporting true streaming
- * through the StreamHandler.
- *
- * @param callable $default Handler used for non-streaming responses
- * @param callable $streaming Handler used for streaming responses
- *
- * @return callable Returns the composed handler.
- */
- public static function wrapStreaming(
- callable $default,
- callable $streaming
- ) {
- return function (RequestInterface $request, array $options) use ($default, $streaming) {
- return empty($options['stream'])
- ? $default($request, $options)
- : $streaming($request, $options);
- };
- }
-}