1 | <?php declare(strict_types=1); |
||
19 | class HttpAdapter extends AbstractClient implements SyncAdapterInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var Guzzle |
||
23 | */ |
||
24 | private $guzzle; |
||
25 | |||
26 | /** |
||
27 | * @var Client |
||
28 | */ |
||
29 | private $client; |
||
30 | |||
31 | /** |
||
32 | * HttpAdapter constructor. |
||
33 | * @param Client $client |
||
34 | */ |
||
35 | public function __construct(Client $client) |
||
41 | |||
42 | /** |
||
43 | * @param Client $client |
||
44 | * @param array $options |
||
45 | * @return array |
||
46 | */ |
||
47 | private function injectToken(Client $client, array $options) |
||
56 | |||
57 | /** |
||
58 | * @param Route $route |
||
59 | * @return array |
||
60 | * @throws \RuntimeException |
||
61 | * @throws \InvalidArgumentException |
||
62 | */ |
||
63 | public function request(Route $route): array |
||
84 | |||
85 | /** |
||
86 | * @param Route $route |
||
87 | * @return array |
||
88 | */ |
||
89 | private function prepareRequestOptions(Route $route): array |
||
99 | |||
100 | /** |
||
101 | * @param ResponseInterface $response |
||
102 | * @return array |
||
103 | * @throws \RuntimeException |
||
104 | */ |
||
105 | private function parseResponse(ResponseInterface $response): array |
||
115 | } |
||
116 |