| 1 | <?php |
||
| 7 | abstract class Endpoint |
||
| 8 | { |
||
| 9 | const RESOURCE = '/resource'; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var RequestInterface |
||
| 13 | */ |
||
| 14 | protected $request; |
||
| 15 | |||
| 16 | public function __construct(RequestInterface $request) |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $uri |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | protected function getResourceUri($uri = '') |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $verb |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | protected function getResource($verb = '') |
||
| 40 | |||
| 41 | protected function postResource($verb = '') |
||
| 45 | |||
| 46 | protected function deleteResource($verb = '') |
||
| 50 | |||
| 51 | protected function getRequest() |
||
| 55 | } |