1 | <?php namespace Atog\Api; |
||
7 | abstract class Endpoint |
||
8 | { |
||
9 | /** |
||
10 | * @var \Atog\Api\Client |
||
11 | */ |
||
12 | protected $client; |
||
13 | |||
14 | /** |
||
15 | * @var \Atog\Api\Model |
||
16 | */ |
||
17 | protected $model; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $endpoint; |
||
23 | |||
24 | /** |
||
25 | * Endpoint constructor. |
||
26 | * @param \Atog\Api\Client $client |
||
27 | * @param \Atog\Api\Model $model |
||
28 | */ |
||
29 | 2 | public function __construct(Client $client, Model $model) |
|
34 | |||
35 | /** |
||
36 | * @return \Atog\Api\Model |
||
37 | */ |
||
38 | 1 | public function getModel() |
|
42 | |||
43 | /** |
||
44 | * Get the endpoint url for the request |
||
45 | * @param string $path |
||
46 | * @param bool $withTrailingSlash |
||
47 | * @return string |
||
48 | */ |
||
49 | 1 | public function getEndpointUrl($path, $withTrailingSlash) |
|
59 | } |
||
60 |