1 | <?php |
||
21 | abstract class AbstractResource |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @var Api |
||
26 | * @internal |
||
27 | */ |
||
28 | private $api; |
||
29 | |||
30 | /** |
||
31 | * @var String |
||
32 | * @internal |
||
33 | */ |
||
34 | protected $endpoint; |
||
35 | |||
36 | /** |
||
37 | * Resource constructor |
||
38 | * |
||
39 | * Constructs a new resource |
||
40 | * |
||
41 | * @param Api $api |
||
42 | * @internal |
||
43 | * |
||
44 | */ |
||
45 | public function __construct(Api $api) |
||
49 | |||
50 | /** |
||
51 | * Creates the endpoint |
||
52 | * |
||
53 | * @param null $id The endpoint terminator |
||
54 | * @return string |
||
55 | * @internal |
||
56 | * |
||
57 | */ |
||
58 | protected function endpoint($id = null) |
||
62 | |||
63 | /** |
||
64 | * @return Api |
||
65 | * @internal |
||
66 | */ |
||
67 | protected function api() |
||
71 | } |
||
72 |