1 | <?php |
||
13 | class Guzzle |
||
14 | { |
||
15 | /** @var Client */ |
||
16 | private $client; |
||
17 | |||
18 | public function __construct(Client $client) |
||
19 | { |
||
20 | $this->client = $client; |
||
21 | } |
||
22 | |||
23 | public function getClient() : Client |
||
24 | { |
||
25 | return $this->client; |
||
26 | } |
||
27 | |||
28 | public function getAsync(string $uri, array $options = []) : PromiseInterface |
||
29 | { |
||
30 | return $this->client->getAsync($uri, $options); |
||
31 | } |
||
32 | |||
33 | public function postAsync(string $uri, array $options = []) : PromiseInterface |
||
34 | { |
||
35 | return $this->client->postAsync($uri, $options); |
||
36 | } |
||
37 | |||
38 | public function get(string $uri, array $options = []) : ResponseInterface |
||
39 | { |
||
40 | return $this->client->get($uri, $options); |
||
41 | } |
||
42 | |||
43 | public function post(string $uri, array $options = []) : ResponseInterface |
||
47 | } |