1 | <?php |
||
13 | class CrudRepository extends EntityRepository implements CrudRepositoryInterface |
||
14 | { |
||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | 4 | public function persist(object $entity, bool $flush = true): object |
|
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | 4 | public function merge(object $entity, bool $flush = false): object |
|
33 | { |
||
34 | 4 | $entity = $this->getEntityManager()->merge($entity); |
|
35 | |||
36 | 4 | if ($flush) { |
|
37 | 4 | $this->flush($entity); |
|
38 | } |
||
39 | |||
40 | 4 | return $entity; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 14 | public function flush(object $entity = null): void |
|
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function detach(object $entity): void |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 2 | public function removeById($id, bool $flush = false): void |
|
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | 6 | public function remove(object $entity, bool $flush = false): void |
|
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | 4 | public function removeAll(bool $flush = false, bool $iterate = true): void |
|
96 | |||
97 | /** |
||
98 | * {@inheritdoc} |
||
99 | */ |
||
100 | 2 | public function findPaginatedBy( |
|
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | 6 | public function countAll(): int |
|
137 | |||
138 | 2 | protected function removeAllByIterating(int $batchSize = 100): void |
|
151 | |||
152 | 2 | protected function removeAllByQuery(): void |
|
159 | |||
160 | protected function createBlankQueryBuilder(): QueryBuilder |
||
164 | } |
||
165 |