1 | <?php |
||
8 | abstract class ManagerBase |
||
9 | { |
||
10 | /** |
||
11 | * @var array A list of query parameters that the URL could possibly have |
||
12 | * Format: query_parameter_name => query_parameter_default_value |
||
13 | */ |
||
14 | protected $queryParameters = []; |
||
15 | |||
16 | /** |
||
17 | * @var \GuzzleHttp\ClientInterface The request client |
||
18 | */ |
||
19 | protected $client; |
||
20 | |||
21 | /** |
||
22 | * @param \GuzzleHttp\ClientInterface $client The request client |
||
23 | */ |
||
24 | 114 | public function __construct(ClientInterface $client) |
|
28 | |||
29 | /** |
||
30 | * Get the client. |
||
31 | * |
||
32 | * @return \GuzzleHttp\ClientInterface The request client |
||
33 | */ |
||
34 | 18 | public function getClient() { |
|
37 | |||
38 | /** |
||
39 | * Make the given Request and return as JSON Decoded PHP object. |
||
40 | * |
||
41 | * @param \Psr\Http\Message\RequestInterface $request |
||
42 | * |
||
43 | * @return mixed the value encoded in <i>json</i> in appropriate |
||
44 | * PHP type. Values true, false and |
||
45 | * null (case-insensitive) are returned as <b>TRUE</b>, <b>FALSE</b> |
||
46 | * and <b>NULL</b> respectively. <b>NULL</b> is returned if the |
||
47 | * <i>json</i> cannot be decoded or if the encoded |
||
48 | * data is deeper than the recursion limit |
||
49 | */ |
||
50 | 78 | protected function getResponseJson(RequestInterface $request) |
|
57 | |||
58 | /** |
||
59 | * Get query string of using the options. |
||
60 | * |
||
61 | * @param $options The options |
||
62 | * @return string The query string |
||
63 | */ |
||
64 | 18 | protected function getQueryString($options) { |
|
81 | |||
82 | } |
||
83 |