1 | <?php |
||
11 | class RepositoryCrudService implements CrudServiceInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var CrudRepositoryInterface |
||
15 | */ |
||
16 | private $repository; |
||
17 | |||
18 | 10 | public function __construct(CrudRepositoryInterface $repository) |
|
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 2 | public function find($id): ?object |
|
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | 4 | public function findAll(): array |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function findAllPaginated(int $page = 1, int $perPage = 50): Paginator |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 2 | public function create(object $entity): object |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 2 | public function update(object $entity): object |
|
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 4 | public function save(object $entity): object |
|
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function remove(object $entity): void |
||
80 | |||
81 | 10 | protected function getRepository(): CrudRepositoryInterface |
|
85 | } |
||
86 |
This method has been deprecated.