Total Complexity | 5 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class TransactionManager |
||
10 | { |
||
11 | public const OPERATION_TYPE_INSERT = 'insert'; |
||
12 | public const OPERATION_TYPE_UPDATE = 'update'; |
||
13 | public const OPERATION_TYPE_REMOVE = 'remove'; |
||
14 | public const OPERATION_TYPE_ASSOCIATE = 'associate'; |
||
15 | public const OPERATION_TYPE_DISSOCIATE = 'dissociate'; |
||
16 | |||
17 | /** |
||
18 | * @var Configuration |
||
19 | */ |
||
20 | private $configuration; |
||
21 | |||
22 | /** |
||
23 | * @var TransactionProcessor |
||
24 | */ |
||
25 | private $processor; |
||
26 | |||
27 | /** |
||
28 | * @var TransactionHydrator |
||
29 | */ |
||
30 | private $hydrator; |
||
31 | |||
32 | public function __construct(Configuration $configuration) |
||
33 | { |
||
34 | $this->configuration = $configuration; |
||
35 | |||
36 | $this->processor = new TransactionProcessor($configuration); |
||
37 | $this->hydrator = new TransactionHydrator($configuration); |
||
38 | } |
||
39 | |||
40 | public function getConfiguration(): Configuration |
||
41 | { |
||
42 | return $this->configuration; |
||
43 | } |
||
44 | |||
45 | public function populate(Transaction $transaction): void |
||
46 | { |
||
47 | $this->hydrator->hydrate($transaction); |
||
48 | } |
||
49 | |||
50 | public function process(Transaction $transaction): void |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param EntityManagerInterface $em |
||
57 | * |
||
58 | * @return EntityManagerInterface |
||
59 | */ |
||
60 | public function selectStorageSpace(EntityManagerInterface $em): EntityManagerInterface |
||
65 |