| 1 | <?php |
||
| 7 | class TransactionManager |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var EntityManagerInterface |
||
| 11 | */ |
||
| 12 | private $entityManager; |
||
| 13 | |||
| 14 | 10 | public function __construct(EntityManagerInterface $entityManager) |
|
| 18 | |||
| 19 | 9 | public function beginTransaction() |
|
| 23 | |||
| 24 | 9 | public function commitTransaction(): bool |
|
| 36 | |||
| 37 | public function rollbackTransaction() |
||
| 41 | |||
| 42 | public function isInTransaction() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param callable $func |
||
| 51 | * |
||
| 52 | * @return mixed |
||
| 53 | */ |
||
| 54 | 9 | public function transactional($func) |
|
| 75 | } |
||
| 76 |