| 1 | <?php |
||
| 7 | class TransactionManager |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var EntityManagerInterface |
||
| 12 | */ |
||
| 13 | private $entityManager; |
||
| 14 | |||
| 15 | public function __construct(EntityManagerInterface $entityManager) |
||
| 19 | |||
| 20 | public function beginTransaction() |
||
| 24 | |||
| 25 | public function commitTransaction() |
||
| 33 | |||
| 34 | public function rollbackTransaction() |
||
| 38 | |||
| 39 | public function isInTransaction() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param callable $func |
||
| 48 | * |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | public function transactional($func) |
||
| 72 | } |
||
| 73 |