1 | <?php |
||
21 | abstract class AbstractApi |
||
22 | { |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | const ENDPOINT = 'https://api.digitalocean.com/v2'; |
||
27 | |||
28 | /** |
||
29 | * @var AdapterInterface |
||
30 | */ |
||
31 | protected $adapter; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $endpoint; |
||
37 | |||
38 | /** |
||
39 | * @var Meta |
||
40 | */ |
||
41 | protected $meta; |
||
42 | |||
43 | /** |
||
44 | * @param AdapterInterface $adapter |
||
45 | * @param string|null $endpoint |
||
46 | */ |
||
47 | public function __construct(AdapterInterface $adapter, $endpoint = null) |
||
52 | |||
53 | /** |
||
54 | * @param \stdClass $data |
||
55 | * |
||
56 | * @return Meta|null |
||
57 | */ |
||
58 | protected function extractMeta(\StdClass $data) |
||
66 | |||
67 | /** |
||
68 | * @return Meta|null |
||
69 | */ |
||
70 | public function getMeta() |
||
74 | } |
||
75 |