1 | <?php |
||
10 | class AggregateReconstructor |
||
11 | { |
||
12 | /** |
||
13 | * @var Snapshotter |
||
14 | */ |
||
15 | private $snapshooter; |
||
16 | |||
17 | /** |
||
18 | * @var AnnotationReader |
||
19 | */ |
||
20 | private $annotationReader; |
||
21 | |||
22 | /** |
||
23 | * @param Snapshotter $snapshotter |
||
24 | */ |
||
25 | 7 | public function __construct($snapshotter) |
|
30 | |||
31 | /** |
||
32 | * @param string $class |
||
33 | * @param EventStreamInterface $eventStream |
||
34 | * @param SnapshotInterface $snapshot |
||
35 | * @return EventSourcedAggregateRootInterface |
||
36 | */ |
||
37 | 7 | public function reconstitute($class, $eventStream, $snapshot = null) |
|
67 | |||
68 | /** |
||
69 | * @param string $class |
||
70 | */ |
||
71 | 7 | private function assertValidClass($class) |
|
81 | |||
82 | /** |
||
83 | * @param string $class |
||
84 | * @return EventSourcedAggregateRootInterface |
||
85 | */ |
||
86 | 2 | private function buildEmptyAggregate($class) |
|
90 | } |
||
91 |