Kdyby\Translation\PrefixedTranslator::__construct PHP Метод

__construct() публичный Метод

public __construct ( string $prefix, ITranslator $translator )
$prefix string
$translator ITranslator
    public function __construct($prefix, ITranslator $translator)
    {
        if ($translator instanceof PrefixedTranslator) {
            // todo: this is just an experiment
            $translator = $translator->unwrap();
        }
        $this->translator = $translator;
        $this->prefix = rtrim($prefix, '.');
    }