| 1 | <?php  | 
            ||
| 22 | class Snapshot implements SerializableInterface  | 
            ||
| 23 | { | 
            ||
| 24 | /**  | 
            ||
| 25 | * @var string  | 
            ||
| 26 | */  | 
            ||
| 27 | protected $snapshotName;  | 
            ||
| 28 | |||
| 29 | /**  | 
            ||
| 30 | * @var EventSourcedAggregateRootInterface  | 
            ||
| 31 | */  | 
            ||
| 32 | protected $aggregate;  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 | * @var int  | 
            ||
| 36 | */  | 
            ||
| 37 | protected $version;  | 
            ||
| 38 | |||
| 39 | /**  | 
            ||
| 40 | * @var \DateTime  | 
            ||
| 41 | */  | 
            ||
| 42 | protected $createdAt;  | 
            ||
| 43 | |||
| 44 | /**  | 
            ||
| 45 | * Snapshot constructor.  | 
            ||
| 46 | *  | 
            ||
| 47 | * @param string $snapshotName  | 
            ||
| 48 | * @param EventSourcedAggregateRootInterface $aggregate  | 
            ||
| 49 | */  | 
            ||
| 50 | public function __construct($snapshotName, EventSourcedAggregateRootInterface $aggregate)  | 
            ||
| 57 | |||
| 58 | /**  | 
            ||
| 59 | * @return string  | 
            ||
| 60 | */  | 
            ||
| 61 | public function snapshotName()  | 
            ||
| 65 | |||
| 66 | /**  | 
            ||
| 67 | * @return EventSourcedAggregateRootInterface  | 
            ||
| 68 | */  | 
            ||
| 69 | public function aggregate()  | 
            ||
| 73 | |||
| 74 | /**  | 
            ||
| 75 | * @return Version  | 
            ||
| 76 | */  | 
            ||
| 77 | public function version()  | 
            ||
| 81 | |||
| 82 | /**  | 
            ||
| 83 | * @return \DateTime  | 
            ||
| 84 | */  | 
            ||
| 85 | public function createdAt()  | 
            ||
| 89 | }  | 
            ||
| 90 |