summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.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/CurlHandler.php
parent396c90f921c30de2d15d2ce52d5d1beabf8eb52d (diff)
parent31d2d0c158ad4daa3dde7a905f3c2e312c194f2e (diff)
Test
Diffstat (limited to 'server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php')
-rwxr-xr-xserver/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php45
1 files changed, 0 insertions, 45 deletions
diff --git a/server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php b/server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
deleted file mode 100755
index 43577da..0000000
--- a/server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-namespace GuzzleHttp\Handler;
-
-use GuzzleHttp\Psr7;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * HTTP handler that uses cURL easy handles as a transport layer.
- *
- * When using the CurlHandler, custom curl options can be specified as an
- * associative array of curl option constants mapping to values in the
- * **curl** key of the "client" key of the request.
- */
-class CurlHandler
-{
- /** @var CurlFactoryInterface */
- private $factory;
-
- /**
- * Accepts an associative array of options:
- *
- * - factory: Optional curl factory used to create cURL handles.
- *
- * @param array $options Array of options to use with the handler
- */
- public function __construct(array $options = [])
- {
- $this->factory = isset($options['handle_factory'])
- ? $options['handle_factory']
- : new CurlFactory(3);
- }
-
- public function __invoke(RequestInterface $request, array $options)
- {
- if (isset($options['delay'])) {
- usleep($options['delay'] * 1000);
- }
-
- $easy = $this->factory->create($request, $options);
- curl_exec($easy->handle);
- $easy->errno = curl_errno($easy->handle);
-
- return CurlFactory::finish($this, $easy, $this->factory);
- }
-}