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|null |
||
31 | */ |
||
32 | private $eventId; |
||
33 | |||
34 | 23 | public function __construct( |
|
48 | |||
49 | 1 | public function getDateCreated(): \DateTimeImmutable |
|
53 | |||
54 | 2 | public function getAggregateId() |
|
58 | |||
59 | 2 | public function getAggregateClass() |
|
63 | |||
64 | 1 | public function getAuthenticatedUserId() |
|
68 | |||
69 | 1 | public function getCommandMetadata() |
|
73 | |||
74 | 23 | private function addTimeZone(\DateTimeImmutable $dateCreated): \DateTimeImmutable |
|
79 | |||
80 | 4 | public function withSequenceAndIndex(int $sequence, int $index): self |
|
87 | |||
88 | 4 | public function withEventId(string $eventId): self |
|
94 | |||
95 | 1 | public function getSequence(): ?int |
|
99 | |||
100 | 1 | public function getIndex(): ?int |
|
104 | |||
105 | 4 | public function getEventId(): ?string |
|
109 | } |