public function ExpressionLanguageProvider::getFunctions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/ExpressionLanguageProvider.php \Symfony\Component\DependencyInjection\ExpressionLanguageProvider::getFunctions()
File
- vendor/
symfony/ dependency-injection/ ExpressionLanguageProvider.php, line 27
Class
- ExpressionLanguageProvider
- Define some ExpressionLanguage functions.
Namespace
Symfony\Component\DependencyInjectionCode
public function getFunctions() {
return array(
new ExpressionFunction('service', function ($arg) {
return sprintf('$this->get(%s)', $arg);
}, function (array $variables, $value) {
return $variables['container']
->get($value);
}),
new ExpressionFunction('parameter', function ($arg) {
return sprintf('$this->getParameter(%s)', $arg);
}, function (array $variables, $value) {
return $variables['container']
->getParameter($value);
}),
);
}