1 | <?php |
||
7 | abstract class ReflectionSnapshotTranslator implements SnapshotTranslatorInterface |
||
8 | { |
||
9 | /** |
||
10 | * @return string |
||
11 | */ |
||
12 | abstract protected function aggregateClass(); |
||
13 | |||
14 | /** |
||
15 | * @return string |
||
16 | */ |
||
17 | abstract protected function snapshotClass(); |
||
18 | |||
19 | /** |
||
20 | * @return array |
||
21 | */ |
||
22 | abstract protected function aggregateToSnapshotPropertyDictionary(); |
||
23 | |||
24 | /** |
||
25 | * @param EventSourcedAggregateRootInterface $aggregate |
||
26 | * @return object |
||
27 | */ |
||
28 | 1 | public function buildSnapshotFromAggregate($aggregate) |
|
44 | |||
45 | /** |
||
46 | * @param SnapshotInterface $snapshot |
||
47 | * @return object |
||
48 | */ |
||
49 | 2 | public function buildAggregateFromSnapshot($snapshot) |
|
70 | |||
71 | /** |
||
72 | * @param string $propertyName |
||
73 | * @param string $propertyValue |
||
74 | * @param object $aggregate |
||
75 | * @param \ReflectionClass $reflectedClass |
||
76 | */ |
||
77 | 2 | private function setPropertyValue($propertyName, $propertyValue, $aggregate, $reflectedClass) |
|
83 | } |
||
84 |