1 | <?php |
||
7 | class DelegatedCrudService implements CrudServiceInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var CrudServiceInterface |
||
11 | */ |
||
12 | private $delegate; |
||
13 | |||
14 | public function __construct(CrudServiceInterface $delegate) |
||
18 | |||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | public function find($id): ?object |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function findAll(): array |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function findAllPaginated(int $page = 1, int $perPage = 50): Paginator |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function create(object $entity): object |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function update(object $entity): object |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function remove(object $entity): void |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function save(object $entity): object |
||
74 | |||
75 | protected function getDelegate(): CrudServiceInterface |
||
79 | } |
||
80 |