1 | <?php declare(strict_types=1); |
||
17 | class Client |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var \GuzzleHttp\ClientInterface |
||
22 | */ |
||
23 | protected $guzzleClient; |
||
24 | |||
25 | /** |
||
26 | * @var Reader |
||
27 | */ |
||
28 | protected $reader; |
||
29 | |||
30 | /** |
||
31 | * Client constructor. |
||
32 | * @param ClientInterface $guzzleClient |
||
33 | * @param Reader $reader |
||
34 | */ |
||
35 | 2 | public function __construct(ClientInterface $guzzleClient, Reader $reader) |
|
40 | |||
41 | |||
42 | /** |
||
43 | * @param iterable $requests |
||
44 | * @return \Generator |
||
45 | */ |
||
46 | 2 | public function getPromises(iterable $requests) : \Generator |
|
52 | |||
53 | /** |
||
54 | * @param Request $request |
||
55 | * @return PromiseInterface |
||
56 | */ |
||
57 | 2 | protected function getPromise(Request $request) : PromiseInterface |
|
75 | } |
||
76 |