1 | <?php |
||
5 | final class Message |
||
6 | { |
||
7 | /** |
||
8 | * @var Event |
||
9 | */ |
||
10 | private $event; |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private $headers; |
||
16 | |||
17 | 11 | public function __construct(Event $event, array $metadata = []) |
|
22 | |||
23 | 3 | public function withHeader(string $key, $value): Message |
|
30 | |||
31 | 5 | public function withHeaders(array $headers): Message |
|
38 | |||
39 | 1 | public function aggregateRootId(): ?AggregateRootId |
|
43 | |||
44 | 8 | public function header(string $key) |
|
48 | |||
49 | 3 | public function headers(): array |
|
53 | |||
54 | 9 | public function event(): Event |
|
58 | } |