| 1 | <?php |
||
| 10 | abstract class CrudServiceBase |
||
| 11 | { |
||
| 12 | use ServiceTrait; |
||
| 13 | use UpdateTrait; |
||
| 14 | use ValidateTrait; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Construct. |
||
| 18 | * |
||
| 19 | * @param null $model |
||
| 20 | */ |
||
| 21 | 2 | public function __construct($model = null) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritDoc} |
||
| 30 | */ |
||
| 31 | 4 | public function index() |
|
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritDoc} |
||
| 38 | */ |
||
| 39 | 2 | public function create(array $data = []) |
|
| 51 | 2 | ||
| 52 | /** |
||
| 53 | 2 | * {@inheritDoc} |
|
| 54 | */ |
||
| 55 | 2 | public function read($id) |
|
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritDoc} |
||
| 62 | */ |
||
| 63 | 6 | public function update($id, array $data = []) |
|
| 77 | |||
| 78 | /** |
||
| 79 | * {@inheritDoc} |
||
| 80 | */ |
||
| 81 | 4 | public function delete($id) |
|
| 91 | } |
||
| 92 |