| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest\Action; |
||
| 8 | abstract class RestActionAbstract |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var RestRepository |
||
| 12 | */ |
||
| 13 | protected $repository; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var RestResponseFactory |
||
| 17 | */ |
||
| 18 | protected $response; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param RestRequestAbstract $request |
||
| 22 | * |
||
| 23 | * @return RestResponse |
||
| 24 | */ |
||
| 25 | abstract public function handle(RestRequestAbstract $request); |
||
| 26 | |||
| 27 | /** |
||
| 28 | * RestActionAbstract constructor. |
||
| 29 | * |
||
| 30 | * @param RestRepository $repository |
||
| 31 | * @param RestResponseFactory $response |
||
| 32 | */ |
||
| 33 | 3 | public function __construct(RestRepository $repository, RestResponseFactory $response) |
|
| 34 | { |
||
| 35 | 3 | $this->repository = $repository; |
|
| 36 | 3 | $this->response = $response; |
|
| 37 | 3 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @return RestRepository |
||
| 41 | */ |
||
| 42 | 3 | public function repository() |
|
| 43 | { |
||
| 44 | 3 | return $this->repository; |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return RestResponseFactory |
||
| 49 | */ |
||
| 50 | 2 | public function response() |
|
| 53 | } |
||
| 54 | } |
||
| 55 |