1 | <?php |
||
2 | declare(strict_types=1); |
||
3 | |||
4 | namespace HeroesofAbenez\Chat; |
||
5 | |||
6 | /** |
||
7 | * ChatMessage |
||
8 | * |
||
9 | * @author Jakub Konečný |
||
10 | */ |
||
11 | 1 | class ChatMessage { |
|
12 | use \Nette\SmartObject; |
||
13 | |||
14 | 1 | public function __construct(public int $id, public string $message, public string $when, public ChatCharacter $character) { |
|
0 ignored issues
–
show
introduced
by
![]() |
|||
15 | 1 | } |
|
16 | |||
17 | /** |
||
18 | * @deprecated Access the property directly |
||
19 | */ |
||
20 | public function getId(): int { |
||
21 | return $this->id; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @deprecated Access the property directly |
||
26 | */ |
||
27 | protected function setId(int $id): void { |
||
28 | $this->id = $id; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @deprecated Access the property directly |
||
33 | */ |
||
34 | public function getMessage(): string { |
||
35 | return $this->message; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @deprecated Access the property directly |
||
40 | */ |
||
41 | protected function setMessage(string $message): void { |
||
42 | $this->message = $message; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @deprecated Access the property directly |
||
47 | */ |
||
48 | public function getWhen(): string { |
||
49 | return $this->when; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @deprecated Access the property directly |
||
54 | */ |
||
55 | protected function setWhen(string $when): void { |
||
56 | $this->when = $when; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @deprecated Access the property directly |
||
61 | */ |
||
62 | public function getCharacter(): ChatCharacter { |
||
63 | return $this->character; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @deprecated Access the property directly |
||
68 | */ |
||
69 | protected function setCharacter(ChatCharacter $character): void { |
||
70 | $this->character = $character; |
||
71 | } |
||
72 | } |
||
73 | ?> |