1 | <?php |
||
10 | abstract class BaseRepository extends EntityRepository implements BaseRepositoryInterface |
||
|
|||
11 | { |
||
12 | /** |
||
13 | * Método executado nos eventos ORM\PrePersist e ORM\PreUpdate |
||
14 | */ |
||
15 | public function preSave(BaseEntityInterface $entity) |
||
19 | |||
20 | /** |
||
21 | * Método executado nos eventos ORM\PostPersist e ORM\PostUpdate |
||
22 | */ |
||
23 | public function postSave(BaseEntityInterface $entity) |
||
27 | |||
28 | public function validate(BaseEntityInterface $entity) |
||
46 | |||
47 | public function getClassMetadata() |
||
51 | |||
52 | public function getEntityName() |
||
56 | |||
57 | public function createEntity() |
||
61 | |||
62 | public function createQueryWorker() |
||
66 | |||
67 | public function query() |
||
71 | |||
72 | /** |
||
73 | * @return QueryWorker |
||
74 | */ |
||
75 | public function findAll() |
||
79 | |||
80 | public function findOneBy(array $filters, $abort = true) |
||
90 | |||
91 | public function find($id, $abort = true) |
||
95 | |||
96 | /** |
||
97 | * Inserir ou atualizar um registro. |
||
98 | * |
||
99 | * @param null | string | int | array |
||
100 | * |
||
101 | * @throws InvalidArgumentException Se $input não for null | string | int | array é lançada a exceção |
||
102 | */ |
||
103 | public function findOrCreate($input) |
||
131 | |||
132 | /** |
||
133 | * Marcar um registro como deletado. |
||
134 | * |
||
135 | * @param object | int $target |
||
136 | * |
||
137 | * @throws Symfony\Component\HttpKernel\Exception\NotFoundHttpException Se $target não for encontrado |
||
138 | * |
||
139 | * Bludata\Doctrine\Common\Interfaces |
||
140 | */ |
||
141 | public function remove($target) |
||
149 | |||
150 | /** |
||
151 | * @param Bludata\Doctrine\Common\Interfaces\BaseEntityInterface $entity |
||
152 | * |
||
153 | * @return Bludata\Doctrine\ORM\Repositories\QueryWorker |
||
154 | */ |
||
155 | public function save(BaseEntityInterface $entity) |
||
161 | |||
162 | /** |
||
163 | * @param Bludata\Doctrine\Common\Interfaces\BaseEntityInterface $entity |
||
164 | * |
||
165 | * @return Bludata\Doctrine\ORM\Repositories\QueryWorker |
||
166 | */ |
||
167 | public function flush(BaseEntityInterface $entity = null) |
||
173 | |||
174 | public function em() |
||
178 | } |
||
179 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.