1 | <?php |
||
34 | 1 | class Message implements IMessage |
|
35 | { |
||
36 | |||
37 | 1 | use Nette\SmartObject; |
|
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $message; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | private $level; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | private $title; |
||
53 | |||
54 | /** |
||
55 | * @var bool |
||
56 | */ |
||
57 | private $overlay = FALSE; |
||
58 | |||
59 | /** |
||
60 | * @var bool |
||
61 | */ |
||
62 | private $displayed = FALSE; |
||
63 | |||
64 | /** |
||
65 | * @var Localization\ITranslator |
||
66 | */ |
||
67 | private $translator; |
||
68 | |||
69 | /** |
||
70 | * @var Adapters\IPhraseAdapter |
||
71 | */ |
||
72 | private $messagePhraseAdapter; |
||
73 | |||
74 | /** |
||
75 | * @var Adapters\IPhraseAdapter |
||
76 | */ |
||
77 | private $titlePhraseAdapter; |
||
78 | |||
79 | /** |
||
80 | * @param Localization\ITranslator $translator |
||
81 | * @param Adapters\IPhraseAdapter $messagePhraseAdapter |
||
82 | * @param Adapters\IPhraseAdapter $titlePhraseAdapter |
||
83 | */ |
||
84 | public function __construct( |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function setMessage(string $message) |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function getMessage() : string |
||
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | public function setLevel(string $level) |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | public function getLevel() : string |
||
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | public function info() |
||
143 | |||
144 | /** |
||
145 | * {@inheritdoc} |
||
146 | */ |
||
147 | public function success() |
||
151 | |||
152 | /** |
||
153 | * {@inheritdoc} |
||
154 | */ |
||
155 | public function warning() |
||
159 | |||
160 | /** |
||
161 | * {@inheritdoc} |
||
162 | */ |
||
163 | public function error() |
||
167 | |||
168 | /** |
||
169 | * {@inheritdoc} |
||
170 | */ |
||
171 | public function setTitle(string $title = NULL) |
||
183 | |||
184 | /** |
||
185 | * {@inheritdoc} |
||
186 | */ |
||
187 | public function getTitle() |
||
195 | |||
196 | /** |
||
197 | * {@inheritdoc} |
||
198 | */ |
||
199 | public function setOverlay(bool $overlay) |
||
203 | |||
204 | /** |
||
205 | * {@inheritdoc} |
||
206 | */ |
||
207 | public function hasOverlay() : bool |
||
211 | |||
212 | /** |
||
213 | * {@inheritdoc} |
||
214 | */ |
||
215 | public function setParameters(array $parameter) |
||
221 | |||
222 | /** |
||
223 | * {@inheritdoc} |
||
224 | */ |
||
225 | public function setCount(int $count) |
||
231 | |||
232 | /** |
||
233 | * {@inheritdoc} |
||
234 | */ |
||
235 | public function setDisplayed(bool $displayed = TRUE) |
||
239 | |||
240 | /** |
||
241 | * {@inheritdoc} |
||
242 | */ |
||
243 | public function isDisplayed() : bool |
||
247 | |||
248 | /** |
||
249 | * @param string $method |
||
250 | * |
||
251 | * @throws Exceptions\InvalidStateException |
||
252 | */ |
||
253 | private function validateState(string $method) |
||
259 | |||
260 | /** |
||
261 | * @return bool |
||
262 | */ |
||
263 | private function isUnserialized() : bool |
||
267 | |||
268 | /** |
||
269 | * @return string |
||
270 | */ |
||
271 | public function __toString() |
||
275 | |||
276 | /** |
||
277 | * @return array |
||
278 | */ |
||
279 | public function __sleep() |
||
285 | } |
||
286 |