1 | <?php |
||
12 | abstract class AbstractRepository extends EntityRepository |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @return \Doctrine\ORM\EntityManager |
||
17 | */ |
||
18 | public function getEntityManager() |
||
22 | |||
23 | 14 | public function flush($entity = null) |
|
27 | |||
28 | /** |
||
29 | * @param object $entity |
||
30 | */ |
||
31 | 7 | public function persist($entity) |
|
35 | |||
36 | /** |
||
37 | * @param object $entity |
||
38 | */ |
||
39 | 1 | public function remove($entity) |
|
43 | |||
44 | /** |
||
45 | * @param int|string|array $id |
||
46 | * @return object|null Entity |
||
47 | */ |
||
48 | 27 | public function findOneById($id) |
|
52 | |||
53 | /** |
||
54 | * @param int $limit |
||
55 | * @param int $offset |
||
56 | * @return object[] Entity array |
||
57 | */ |
||
58 | 4 | public function findAllWithLimitAndOffset(int $limit = 50, int $offset = null): array |
|
71 | |||
72 | 4 | public function countAll(): int |
|
80 | |||
81 | 4 | private function getEntityIdField(): string |
|
88 | } |
||
89 |