/library/Google/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php
https://gitlab.com/vangtrangbac123/zinkaiuit.tk · PHP · 36 lines · 17 code · 5 blank · 14 comment · 0 complexity · 326b39b7229d474548c23117ad92a458 MD5 · raw file
- <?php
- namespace Google\Auth\HttpHandler;
- use GuzzleHttp\ClientInterface;
- use Psr\Http\Message\RequestInterface;
- use Psr\Http\Message\ResponseInterface;
- class Guzzle6HttpHandler
- {
- /**
- * @var ClientInterface
- */
- private $client;
- /**
- * @param ClientInterface $client
- */
- public function __construct(ClientInterface $client)
- {
- $this->client = $client;
- }
- /**
- * Accepts a PSR-7 request and an array of options and returns a PSR-7 response.
- *
- * @param RequestInterface $request
- * @param array $options
- *
- * @return ResponseInterface
- */
- public function __invoke(RequestInterface $request, array $options = [])
- {
- return $this->client->send($request, $options);
- }
- }