1 | <?php |
||
9 | class MetaData |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var \DateTimeImmutable |
||
14 | */ |
||
15 | private $dateCreated; |
||
16 | |||
17 | private $aggregateId; |
||
18 | private $authenticatedUserId; |
||
19 | |||
20 | /* @var string */ |
||
21 | private $aggregateClass; |
||
22 | private $commandMetadata; |
||
23 | |||
24 | /** @var int */ |
||
25 | private $sequence = null; |
||
26 | |||
27 | /** @var int */ |
||
28 | private $index = null; |
||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $eventId; |
||
33 | |||
34 | 23 | public function __construct( |
|
50 | |||
51 | 1 | public function getDateCreated(): \DateTimeImmutable |
|
55 | |||
56 | 5 | public function getAggregateId() |
|
60 | |||
61 | 2 | public function getAggregateClass() |
|
65 | |||
66 | 1 | public function getAuthenticatedUserId() |
|
70 | |||
71 | 1 | public function getCommandMetadata() |
|
75 | |||
76 | 23 | private function addTimeZone(\DateTimeImmutable $dateCreated): \DateTimeImmutable |
|
81 | |||
82 | 4 | public function withSequenceAndIndex(int $sequence, int $index): self |
|
89 | |||
90 | 1 | public function getSequence(): ?int |
|
94 | |||
95 | 1 | public function getIndex(): ?int |
|
99 | |||
100 | 3 | public function getEventId(): string |
|
104 | } |