private function PhpDumper::getExpressionLanguage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::getExpressionLanguage()
File
- vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php, line 1509
Class
- PhpDumper
- PhpDumper dumps a service container as a PHP class.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function getExpressionLanguage() {
if (null === $this->expressionLanguage) {
if (!class_exists('Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage')) {
throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
}
$providers = array_merge($this->container
->getExpressionLanguageProviders(), $this->expressionLanguageProviders);
$this->expressionLanguage = new ExpressionLanguage(null, $providers);
if ($this->container
->isTrackingResources()) {
foreach ($providers as $provider) {
$this->container
->addObjectResource($provider);
}
}
}
return $this->expressionLanguage;
}