| 1 | <?php namespace Peek\Api; |
||
| 7 | abstract class Endpoint |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \Peek\Api\Client |
||
| 11 | */ |
||
| 12 | protected $client; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var \Peek\Api\Model |
||
| 16 | */ |
||
| 17 | protected $model; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $endpoint; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Endpoint constructor. |
||
| 26 | * @param \Peek\Api\Client $client |
||
| 27 | * @param \Peek\Api\Model $model |
||
| 28 | */ |
||
| 29 | public function __construct(Client $client, Model $model) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Get the endpoint url for the request |
||
| 37 | * @param string $path |
||
| 38 | * @param bool $withTrailingSlash |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | protected function getEndpointUrl($path, $withTrailingSlash) |
||
| 51 | } |
||
| 52 |