public function DataCollectorTranslator::__construct in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/translation/DataCollectorTranslator.php \Symfony\Component\Translation\DataCollectorTranslator::__construct()
Parameters
TranslatorInterface $translator The translator must implement TranslatorBagInterface:
File
- vendor/
symfony/ translation/ DataCollectorTranslator.php, line 36
Class
- DataCollectorTranslator
- @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
Namespace
Symfony\Component\TranslationCode
public function __construct(TranslatorInterface $translator) {
if (!$translator instanceof TranslatorBagInterface) {
throw new \InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator)));
}
$this->translator = $translator;
}