1 | <?php |
||
11 | final class DoctrineEntityManager implements Transactional |
||
12 | { |
||
13 | /** |
||
14 | * @var EntityManagerInterface |
||
15 | */ |
||
16 | private $entityManager; |
||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | private $closeEntityManagerOnRollback; |
||
21 | |||
22 | /** |
||
23 | * Constructor. |
||
24 | * |
||
25 | * @param EntityManagerInterface $entityManager |
||
26 | * @param bool $closeEntityManagerOnRollback |
||
27 | */ |
||
28 | 30 | public function __construct(EntityManagerInterface $entityManager, $closeEntityManagerOnRollback = false) |
|
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | 9 | public function beginTransaction() |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 6 | public function commit() |
|
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 12 | public function rollback() |
|
78 | } |
||
79 |