| 1 | <?php |
||
| 8 | class TransactionManager |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var EntityManagerInterface |
||
| 13 | */ |
||
| 14 | private $entityManager; |
||
| 15 | |||
| 16 | public function __construct(EntityManagerInterface $entityManager) |
||
| 20 | |||
| 21 | public function beginTransaction() |
||
| 25 | |||
| 26 | public function commitTransaction() |
||
| 34 | |||
| 35 | public function rollbackTransaction() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param callable $func |
||
| 42 | * |
||
| 43 | * @return mixed |
||
| 44 | */ |
||
| 45 | public function transactional($func) |
||
| 66 | } |
||
| 67 |