public function DataCollectorTranslator::__construct in Plug 7
Parameters
TranslatorInterface $translator The translator must implement TranslatorBagInterface:
File
- lib/
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;
}