1 | <?php |
||
19 | 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() |
||
133 | |||
134 | /** |
||
135 | * @return int |
||
136 | */ |
||
137 | public function getCount() |
||
141 | |||
142 | /** |
||
143 | * @param int $count |
||
144 | * |
||
145 | * @return $this |
||
146 | */ |
||
147 | public function setCount($count) |
||
153 | |||
154 | /** |
||
155 | * @return string |
||
156 | */ |
||
157 | public function getDomain() |
||
161 | |||
162 | /** |
||
163 | * @param string $domain |
||
164 | * |
||
165 | * @return $this |
||
166 | */ |
||
167 | public function setDomain($domain) |
||
173 | |||
174 | /** |
||
175 | * @return string |
||
176 | */ |
||
177 | public function getKey() |
||
181 | |||
182 | /** |
||
183 | * @param string $key |
||
184 | * |
||
185 | * @return $this |
||
186 | */ |
||
187 | public function setKey($key) |
||
193 | |||
194 | /** |
||
195 | * @return string |
||
196 | */ |
||
197 | public function getLocale() |
||
201 | |||
202 | /** |
||
203 | * @param string $locale |
||
204 | * |
||
205 | * @return $this |
||
206 | */ |
||
207 | public function setLocale($locale) |
||
213 | |||
214 | /** |
||
215 | * @return int |
||
216 | */ |
||
217 | public function getState() |
||
221 | |||
222 | /** |
||
223 | * @param int $state |
||
224 | * |
||
225 | * @return $this |
||
226 | */ |
||
227 | public function setState($state) |
||
233 | |||
234 | /** |
||
235 | * @return string |
||
236 | */ |
||
237 | public function getTranslation() |
||
241 | |||
242 | /** |
||
243 | * @param string $translation |
||
244 | * |
||
245 | * @return $this |
||
246 | */ |
||
247 | public function setTranslation($translation) |
||
253 | |||
254 | /** |
||
255 | * @return int |
||
256 | */ |
||
257 | public function getTransChoiceNumber() |
||
261 | |||
262 | /** |
||
263 | * @param int $transChoiceNumber |
||
264 | * |
||
265 | * @return $this |
||
266 | */ |
||
267 | public function setTransChoiceNumber($transChoiceNumber) |
||
273 | |||
274 | /** |
||
275 | * @return array |
||
276 | */ |
||
277 | public function getParameters() |
||
281 | |||
282 | /** |
||
283 | * @return bool |
||
284 | */ |
||
285 | public function hasParameters() |
||
289 | |||
290 | /** |
||
291 | * @param array $parameters |
||
292 | * |
||
293 | * @return $this |
||
294 | */ |
||
295 | public function setParameters($parameters) |
||
301 | } |
||
302 |