1 | <?php |
||
34 | 1 | class Message extends Nette\Object implements IMessage |
|
35 | { |
||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $message; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $level; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | private $title; |
||
50 | |||
51 | /** |
||
52 | * @var bool |
||
53 | */ |
||
54 | private $overlay = FALSE; |
||
55 | |||
56 | /** |
||
57 | * @var bool |
||
58 | */ |
||
59 | private $displayed = FALSE; |
||
60 | |||
61 | /** |
||
62 | * @var Localization\ITranslator |
||
63 | */ |
||
64 | private $translator; |
||
65 | |||
66 | /** |
||
67 | * @var Adapters\IPhraseAdapter |
||
68 | */ |
||
69 | private $phraseAdapter; |
||
70 | |||
71 | /** |
||
72 | * @var Adapters\IPhraseAdapter |
||
73 | */ |
||
74 | private $titlePhraseAdapter; |
||
75 | |||
76 | /** |
||
77 | * @param Localization\ITranslator $translator |
||
78 | * @param Adapters\IPhraseAdapter $phraseAdapter |
||
79 | * @param Adapters\IPhraseAdapter $titlePhraseAdapter |
||
80 | */ |
||
81 | public function __construct( |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function setMessage(string $message) |
||
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | public function getMessage() : string |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | public function setLevel(string $level) |
||
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | public function getLevel() : string |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function info() |
||
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | public function success() |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function warning() |
||
156 | |||
157 | /** |
||
158 | * {@inheritdoc} |
||
159 | */ |
||
160 | public function error() |
||
164 | |||
165 | /** |
||
166 | * {@inheritdoc} |
||
167 | */ |
||
168 | public function setTitle(string $title = NULL) |
||
180 | |||
181 | /** |
||
182 | * {@inheritdoc} |
||
183 | */ |
||
184 | public function getTitle() |
||
192 | |||
193 | /** |
||
194 | * {@inheritdoc} |
||
195 | */ |
||
196 | public function setOverlay(bool $overlay) |
||
200 | |||
201 | /** |
||
202 | * {@inheritdoc} |
||
203 | */ |
||
204 | public function hasOverlay() : bool |
||
208 | |||
209 | /** |
||
210 | * {@inheritdoc} |
||
211 | */ |
||
212 | public function setParameters(array $parameter) |
||
218 | |||
219 | /** |
||
220 | * {@inheritdoc} |
||
221 | */ |
||
222 | public function setCount(int $count) |
||
228 | |||
229 | /** |
||
230 | * {@inheritdoc} |
||
231 | */ |
||
232 | public function setDisplayed(bool $displayed = TRUE) |
||
236 | |||
237 | /** |
||
238 | * {@inheritdoc} |
||
239 | */ |
||
240 | public function isDisplayed() : bool |
||
244 | |||
245 | /** |
||
246 | * @param string $method |
||
247 | * |
||
248 | * @throws Exceptions\InvalidStateException |
||
249 | */ |
||
250 | private function validateState(string $method) |
||
256 | |||
257 | /** |
||
258 | * @return bool |
||
259 | */ |
||
260 | private function isUnserialized() : bool |
||
264 | |||
265 | /** |
||
266 | * @return string |
||
267 | */ |
||
268 | public function __toString() |
||
272 | |||
273 | /** |
||
274 | * @return array |
||
275 | */ |
||
276 | public function __sleep() |
||
282 | } |
||
283 |