1 | <?php |
||
6 | abstract class AbstractMessage implements MessageInterface |
||
7 | { |
||
8 | /** |
||
9 | * Type of the message |
||
10 | * |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $type; |
||
14 | /** |
||
15 | * Message |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $message; |
||
20 | /** |
||
21 | * Message identifier (unique id) |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $id; |
||
26 | |||
27 | /** |
||
28 | * @inheritdoc |
||
29 | */ |
||
30 | 154 | public function __construct(string $message) |
|
34 | |||
35 | /** |
||
36 | * @return string |
||
37 | */ |
||
38 | 154 | public function getType(): string |
|
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 154 | public function getMessage(): string |
|
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | 154 | public function getId(): string |
|
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | 154 | public function jsonSerialize() |
|
73 | } |
||
74 |