1 | <?php |
||
13 | class RestApiClient implements ApiClientInterface |
||
14 | { |
||
15 | use LoggableTrait; |
||
16 | |||
17 | /** |
||
18 | * @var ClientInterface |
||
19 | */ |
||
20 | protected $httpClient; |
||
21 | |||
22 | /** |
||
23 | * @var RestApiRequestFactory |
||
24 | */ |
||
25 | protected $requestFactory; |
||
26 | |||
27 | /** |
||
28 | * Construct. |
||
29 | * |
||
30 | * @param ClientInterface $httpClient |
||
31 | * @param RestApiRequestFactory $requestFactory |
||
32 | */ |
||
33 | public function __construct(ClientInterface $httpClient, RestApiRequestFactory $requestFactory) |
||
38 | |||
39 | /** |
||
40 | * @see ApiClientInterface::send() |
||
41 | */ |
||
42 | public function send( |
||
58 | |||
59 | /** |
||
60 | * @see ApiClientInterface::cget() |
||
61 | */ |
||
62 | public function cget(array $query = array(), array $options = array()) |
||
66 | |||
67 | /** |
||
68 | * @see ApiClientInterface::get() |
||
69 | */ |
||
70 | public function get(array $query = array(), array $options = array()) |
||
74 | |||
75 | /** |
||
76 | * @see ApiClientInterface::post() |
||
77 | */ |
||
78 | public function post(array $query = array(), array $body = array(), array $options = array()) |
||
82 | |||
83 | /** |
||
84 | * @see ApiClientInterface::put() |
||
85 | */ |
||
86 | public function put(array $query = array(), array $body = array(), array $options = array()) |
||
90 | |||
91 | /** |
||
92 | * @see ApiClientInterface::delete() |
||
93 | */ |
||
94 | public function delete(array $query = array(), array $body = array(), array $options = array()) |
||
98 | } |
||
99 |