| 1 | <?php |
||
| 10 | final class VersionTwo implements Event |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var AggregateRootId |
||
| 14 | */ |
||
| 15 | private $aggregateRootId; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var PointInTime |
||
| 19 | */ |
||
| 20 | private $timeOfRecording; |
||
| 21 | |||
| 22 | public function __construct( |
||
| 29 | |||
| 30 | public function aggregateRootId(): AggregateRootId |
||
| 34 | |||
| 35 | public function eventVersion(): int |
||
| 39 | |||
| 40 | public function timeOfRecording(): PointInTime |
||
| 44 | |||
| 45 | public static function fromPayload( |
||
| 55 | |||
| 56 | public function toPayload(): array |
||
| 60 | |||
| 61 | public static function with(AggregateRootId $aggregateRootId, PointInTime $timeOfRecording): VersionTwo |
||
| 68 | |||
| 69 | } |
||
| 70 |