private function TranslationDataCollector::sanitizeCollectedMessages in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/DataCollector/TranslationDataCollector.php \Symfony\Component\Translation\DataCollector\TranslationDataCollector::sanitizeCollectedMessages()
1 call to TranslationDataCollector::sanitizeCollectedMessages()
- TranslationDataCollector::lateCollect in vendor/
symfony/ translation/ DataCollector/ TranslationDataCollector.php - Collects data as late as possible.
File
- vendor/
symfony/ translation/ DataCollector/ TranslationDataCollector.php, line 96
Class
- TranslationDataCollector
- @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
Namespace
Symfony\Component\Translation\DataCollectorCode
private function sanitizeCollectedMessages($messages) {
$result = array();
foreach ($messages as $key => $message) {
$messageId = $message['locale'] . $message['domain'] . $message['id'];
if (!isset($result[$messageId])) {
$message['count'] = 1;
$messages[$key]['translation'] = $this
->sanitizeString($message['translation']);
$result[$messageId] = $message;
}
else {
++$result[$messageId]['count'];
}
unset($messages[$key]);
}
return $result;
}