1 | <?php |
||
10 | class EntityService extends AbstractService implements EntityServiceInterface |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var EntityRepositoryInterface |
||
15 | */ |
||
16 | protected $repository; |
||
17 | |||
18 | /** |
||
19 | * @param EntityRepositoryInterface $repository |
||
20 | */ |
||
21 | public function __construct(EntityRepositoryInterface $repository) |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function listAll() |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function findById($id) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function fetchById($id) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function save(EntityInterface $entity) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function removeById($id) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function remove(EntityInterface $entity) |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | public function removeAll() |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | public function listPaginated($page, $perPage) |
||
103 | |||
104 | /** |
||
105 | * @return EntityRepositoryInterface |
||
106 | */ |
||
107 | protected function getRepository() |
||
111 | } |
||
112 |