1 | <?php declare(strict_types=1); |
||
25 | class Client implements ClientInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var \GuzzleHttp\ClientInterface |
||
29 | */ |
||
30 | protected $guzzleClient; |
||
31 | |||
32 | /** |
||
33 | * @param \GuzzleHttp\ClientInterface $guzzleClient |
||
34 | */ |
||
35 | 11 | public function __construct(\GuzzleHttp\ClientInterface $guzzleClient) |
|
39 | |||
40 | /** |
||
41 | * @param string $url |
||
42 | * @param \DateTime $modifiedSince |
||
43 | * @return ResponseInterface |
||
44 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
45 | */ |
||
46 | 3 | public function getResponse(string $url, \DateTime $modifiedSince) : ResponseInterface |
|
61 | |||
62 | /** |
||
63 | * @param iterable $requests |
||
64 | * @param ReaderInterface $reader |
||
65 | * @return \Generator |
||
66 | */ |
||
67 | 4 | public function getPromises(iterable $requests, ReaderInterface $reader) : \Generator |
|
73 | |||
74 | /** |
||
75 | * @param Request $request |
||
76 | * @param ReaderInterface $reader |
||
77 | * @return PromiseInterface |
||
78 | */ |
||
79 | 4 | protected function getPromise(Request $request, ReaderInterface $reader) : PromiseInterface |
|
96 | |||
97 | /** |
||
98 | * @param Request $request |
||
99 | * @return PromiseInterface |
||
100 | */ |
||
101 | 4 | protected function newPromise(Request $request) : PromiseInterface |
|
107 | |||
108 | /** |
||
109 | * @param \DateTime $modifiedSince |
||
110 | * @return array |
||
111 | */ |
||
112 | 7 | protected function getOptions(\DateTime $modifiedSince) : array |
|
121 | } |
||
122 |