| 1 | <?php declare(strict_types=1); |
||
| 9 | abstract class AbstractRepository extends ServiceEntityRepository |
||
| 10 | { |
||
| 11 | use AbstractRepositoryTrait; |
||
| 12 | |||
| 13 | public function __construct(ManagerRegistry $registry, string $entityClass) |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param $object |
||
| 20 | * @throws \Doctrine\ORM\ORMException |
||
| 21 | */ |
||
| 22 | public function persist($object) : void |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param null|object|array $entity |
||
| 29 | * @throws \Doctrine\ORM\ORMException |
||
| 30 | * @throws \Doctrine\ORM\OptimisticLockException |
||
| 31 | */ |
||
| 32 | public function flush($entity = null) : void |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Helper method for calling persist and flush successively |
||
| 39 | * |
||
| 40 | * @param object $entity |
||
| 41 | * @throws \Doctrine\ORM\ORMException |
||
| 42 | * @throws \Doctrine\ORM\OptimisticLockException |
||
| 43 | */ |
||
| 44 | public function save($entity) |
||
| 49 | } |
||
| 50 |