| 1 | <?php |
||
| 11 | class Snapshot |
||
| 12 | { |
||
| 13 | private $version; |
||
| 14 | |||
| 15 | private $aggregate; |
||
| 16 | |||
| 17 | private $creationDate; |
||
| 18 | |||
| 19 | public function __construct(AggregateRoot $aggregate, $version, $creationDate) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get the aggregate root |
||
| 28 | * |
||
| 29 | * @return AggregateRoot |
||
| 30 | */ |
||
| 31 | public function getAggregate() |
||
| 35 | |||
| 36 | public function getVersion() |
||
| 40 | |||
| 41 | public function getCreationDate() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Apply missing events that were commited to the event store since this snapshot was made |
||
| 48 | * |
||
| 49 | * @param \Domain\Snapshotting\CommitedEvents $events |
||
| 50 | */ |
||
| 51 | public function correctMissingHistory(CommittedEvents $events) |
||
| 57 | } |
||
| 58 |