1 | <?php |
||
10 | final class EventWithDescription implements Event |
||
11 | { |
||
12 | /** |
||
13 | * @var AggregateRootId |
||
14 | */ |
||
15 | private $aggregateRootId; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $description; |
||
21 | |||
22 | /** |
||
23 | * @var PointInTime |
||
24 | */ |
||
25 | private $timeOfRecording; |
||
26 | |||
27 | public function __construct( |
||
36 | |||
37 | public function aggregateRootId(): AggregateRootId |
||
41 | |||
42 | public function description(): string |
||
46 | |||
47 | public function eventVersion(): int |
||
51 | |||
52 | public function timeOfRecording(): PointInTime |
||
56 | |||
57 | public static function fromPayload( |
||
68 | |||
69 | public function toPayload(): array |
||
75 | |||
76 | /** |
||
77 | * @codeCoverageIgnore |
||
78 | */ |
||
79 | public function withDescription(string $description): EventWithDescription |
||
85 | |||
86 | public static function with(AggregateRootId $aggregateRootId, PointInTime $timeOfRecording): EventWithDescription |
||
94 | |||
95 | } |
||
96 |