summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
diff options
context:
space:
mode:
authorEole <EoleDev@outlook.fr>2016-04-27 16:42:28 +0200
committerEole <EoleDev@outlook.fr>2016-04-27 16:42:28 +0200
commit49f416dc5061032e0514ea0cfeceaca37d13e432 (patch)
tree1202ac2a6fa860b8929afdc886c94fc50bd0a1de /server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
parentc7edd70b5e5b0f5159c78ce3d924d4e7f60db816 (diff)
parentc9202d9113210981ae47df40511645da2ee140df (diff)
Merge branch 'develop' into Eole_Graph
Conflicts: client/index.html client/js/controllers/home/home.js client/partials/home/home.html
Diffstat (limited to 'server/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php')
-rw-r--r--server/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 100644
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);
- }
-}