| 1 | <?php |
||
| 11 | class Transaction implements BaseTransaction |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var UnitOfWork |
||
| 15 | */ |
||
| 16 | private $unitOfWork; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param UnitOfWork $unitOfWork |
||
| 20 | */ |
||
| 21 | public function __construct(UnitOfWork $unitOfWork) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return void |
||
| 28 | * |
||
| 29 | * @api |
||
| 30 | */ |
||
| 31 | public function commit() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return void |
||
| 38 | * |
||
| 39 | * @api |
||
| 40 | */ |
||
| 41 | public function rollback() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param mixed $entity |
||
| 48 | * @return boolean |
||
| 49 | * |
||
| 50 | * @api |
||
| 51 | */ |
||
| 52 | public function contains($entity) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param mixed $entity |
||
| 59 | * |
||
| 60 | * @api |
||
| 61 | */ |
||
| 62 | public function persist($entity) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @param mixed $entity |
||
| 69 | * |
||
| 70 | * @api |
||
| 71 | */ |
||
| 72 | public function delete($entity) |
||
| 76 | } |
||
| 77 |