1 | <?php |
||
11 | class MetaData |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var \DateTimeImmutable |
||
16 | */ |
||
17 | private $dateCreated; |
||
18 | |||
19 | private $aggregateId; |
||
20 | private $authenticatedUserId; |
||
21 | |||
22 | /* @var string */ |
||
23 | private $aggregateClass; |
||
24 | |||
25 | /** @var CommandMetadata|null */ |
||
26 | private $commandMetadata; |
||
27 | |||
28 | /** @var int */ |
||
29 | private $sequence = null; |
||
30 | |||
31 | /** @var int */ |
||
32 | private $index = null; |
||
33 | /** |
||
34 | * @var string|null |
||
35 | */ |
||
36 | private $eventId; |
||
37 | |||
38 | 28 | public function __construct( |
|
52 | |||
53 | 1 | public function getDateCreated(): \DateTimeImmutable |
|
57 | |||
58 | 2 | public function getAggregateId() |
|
62 | |||
63 | 2 | public function getAggregateClass() |
|
67 | |||
68 | 1 | public function getAuthenticatedUserId() |
|
72 | |||
73 | 1 | public function getCommandMetadata():?CommandMetadata |
|
77 | |||
78 | 28 | private function addTimeZone(\DateTimeImmutable $dateCreated): \DateTimeImmutable |
|
83 | |||
84 | 4 | public function withSequenceAndIndex(int $sequence, int $index): self |
|
91 | |||
92 | 11 | public function withEventId(string $eventId): self |
|
98 | |||
99 | 1 | public function getSequence(): ?int |
|
103 | |||
104 | 1 | public function getIndex(): ?int |
|
108 | |||
109 | 5 | public function getEventId(): ?string |
|
113 | } |