Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class UnitOfWorkManager extends Manager |
||
11 | { |
||
12 | /** |
||
13 | * @var UnitOfWork |
||
14 | */ |
||
15 | protected $uow; |
||
16 | |||
17 | /** |
||
18 | * Create an instance |
||
19 | * |
||
20 | * @param DBInterface $db the database access object |
||
21 | * @param UnitOfWork $uow the unit of work object |
||
22 | */ |
||
23 | 1 | public function __construct(DBInterface $db, UnitOfWork $uow) |
|
27 | 1 | } |
|
28 | /** |
||
29 | * Get a repository from a table query |
||
30 | * |
||
31 | * @param TableQuery $query |
||
32 | * @return Repository |
||
33 | */ |
||
34 | 1 | public function fromQuery(TableQuery $query) : Repository |
|
35 | { |
||
36 | 1 | return new UnitOfWorkRepository(parent::fromQuery($query), $this->uow); |
|
37 | } |
||
38 | /** |
||
39 | * Save all the pending changes |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | 1 | public function save() |
|
46 | 1 | } |
|
47 | } |
||
48 |