1 | <?php |
||
19 | final class SfProfilerMessage |
||
20 | { |
||
21 | /** |
||
22 | * @var int |
||
23 | * |
||
24 | * This is the number of times the message occurs on a specific page |
||
25 | */ |
||
26 | private $count; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | * |
||
31 | * The domain the message belongs to |
||
32 | */ |
||
33 | private $domain; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | * |
||
38 | * The key/phrase you write in the source code |
||
39 | */ |
||
40 | private $key; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | * |
||
45 | * The locale the translations is on |
||
46 | */ |
||
47 | private $locale; |
||
48 | |||
49 | /** |
||
50 | * @var int |
||
51 | * |
||
52 | * The current state of the translations. See Symfony\Component\Translation\DataCollectorTranslator |
||
53 | * |
||
54 | * MESSAGE_DEFINED = 0; |
||
55 | * MESSAGE_MISSING = 1; |
||
56 | * MESSAGE_EQUALS_FALLBACK = 2; |
||
57 | */ |
||
58 | private $state; |
||
59 | |||
60 | /** |
||
61 | * @var string |
||
62 | * |
||
63 | * The translated string. This is the preview of the message. Ie no placeholders is visible. |
||
64 | */ |
||
65 | private $translation; |
||
66 | |||
67 | /** |
||
68 | * @var int |
||
69 | * |
||
70 | * The number which we are feeding a transChoice with |
||
71 | * Used only in Symfony >2.8 |
||
72 | */ |
||
73 | private $transChoiceNumber; |
||
74 | |||
75 | /** |
||
76 | * @var array |
||
77 | * |
||
78 | * The parameters sent to the translations |
||
79 | * Used only in Symfony >2.8 |
||
80 | */ |
||
81 | private $parameters; |
||
82 | |||
83 | /** |
||
84 | * @param array $data |
||
85 | * |
||
86 | * @return SfProfilerMessage |
||
87 | */ |
||
88 | public static function create(array $data) |
||
118 | |||
119 | /** |
||
120 | * Convert to a Common\Message. |
||
121 | * |
||
122 | * @return Message |
||
123 | */ |
||
124 | public function convertToMessage() |
||
149 | |||
150 | /** |
||
151 | * @return int |
||
152 | */ |
||
153 | public function getCount() |
||
157 | |||
158 | /** |
||
159 | * @param int $count |
||
160 | * |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function setCount($count) |
||
169 | |||
170 | /** |
||
171 | * @return string |
||
172 | */ |
||
173 | public function getDomain() |
||
177 | |||
178 | /** |
||
179 | * @param string $domain |
||
180 | * |
||
181 | * @return $this |
||
182 | */ |
||
183 | public function setDomain($domain) |
||
189 | |||
190 | /** |
||
191 | * @return string |
||
192 | */ |
||
193 | public function getKey() |
||
197 | |||
198 | /** |
||
199 | * @param string $key |
||
200 | * |
||
201 | * @return $this |
||
202 | */ |
||
203 | public function setKey($key) |
||
209 | |||
210 | /** |
||
211 | * @return string |
||
212 | */ |
||
213 | public function getLocale() |
||
217 | |||
218 | /** |
||
219 | * @param string $locale |
||
220 | * |
||
221 | * @return $this |
||
222 | */ |
||
223 | public function setLocale($locale) |
||
229 | |||
230 | /** |
||
231 | * @return int |
||
232 | */ |
||
233 | public function getState() |
||
237 | |||
238 | /** |
||
239 | * @param int $state |
||
240 | * |
||
241 | * @return $this |
||
242 | */ |
||
243 | public function setState($state) |
||
249 | |||
250 | /** |
||
251 | * @return string |
||
252 | */ |
||
253 | public function getTranslation() |
||
257 | |||
258 | /** |
||
259 | * @param string $translation |
||
260 | * |
||
261 | * @return $this |
||
262 | */ |
||
263 | public function setTranslation($translation) |
||
269 | |||
270 | /** |
||
271 | * @return int |
||
272 | */ |
||
273 | public function getTransChoiceNumber() |
||
277 | |||
278 | /** |
||
279 | * @param int $transChoiceNumber |
||
280 | * |
||
281 | * @return $this |
||
282 | */ |
||
283 | public function setTransChoiceNumber($transChoiceNumber) |
||
289 | |||
290 | /** |
||
291 | * @return array |
||
292 | */ |
||
293 | public function getParameters() |
||
297 | |||
298 | /** |
||
299 | * @return bool |
||
300 | */ |
||
301 | public function hasParameters() |
||
305 | |||
306 | /** |
||
307 | * @param array $parameters |
||
308 | * |
||
309 | * @return $this |
||
310 | */ |
||
311 | public function setParameters($parameters) |
||
317 | } |
||
318 |