| 1 | <?php |
||
| 11 | abstract class AbstractRepository extends ServiceEntityRepository |
||
| 12 | { |
||
| 13 | use AbstractRepositoryTrait; |
||
| 14 | |||
| 15 | public function __construct(ManagerRegistry $registry, string $entityClass) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param $object |
||
| 22 | * @throws \Doctrine\ORM\ORMException |
||
| 23 | */ |
||
| 24 | public function persist($object) : void |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param null|object|array $entity |
||
| 31 | * @throws \Doctrine\ORM\ORMException |
||
| 32 | * @throws \Doctrine\ORM\OptimisticLockException |
||
| 33 | */ |
||
| 34 | public function flush($entity = null) : void |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Helper method for calling persist and flush successively |
||
| 41 | * |
||
| 42 | * @param object $entity |
||
| 43 | * @throws \Doctrine\ORM\ORMException |
||
| 44 | * @throws \Doctrine\ORM\OptimisticLockException |
||
| 45 | */ |
||
| 46 | public function save($entity) |
||
| 51 | } |
||
| 52 |