summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
diff options
context:
space:
mode:
authorLoic GUEGAN <loic@Manzerbredes.home>2016-04-16 19:10:27 +0200
committerLoic GUEGAN <loic@Manzerbredes.home>2016-04-16 19:10:27 +0200
commita3ff4d243e2ac37d4516ae56ff86985eadc00eb8 (patch)
tree32e71c42855cc46d95d9c6b74ad2c145eb9ec7eb /server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
parent396c90f921c30de2d15d2ce52d5d1beabf8eb52d (diff)
parent31d2d0c158ad4daa3dde7a905f3c2e312c194f2e (diff)
Test
Diffstat (limited to 'server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php')
-rwxr-xr-xserver/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 100755
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);
- };
- }
-}