Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/ExpressionLanguageProvider.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 7a779792577d |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
31 $this->serviceCompiler = $serviceCompiler; | 31 $this->serviceCompiler = $serviceCompiler; |
32 } | 32 } |
33 | 33 |
34 public function getFunctions() | 34 public function getFunctions() |
35 { | 35 { |
36 return array( | 36 return [ |
37 new ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) { | 37 new ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) { |
38 return sprintf('$this->get(%s)', $arg); | 38 return sprintf('$this->get(%s)', $arg); |
39 }, function (array $variables, $value) { | 39 }, function (array $variables, $value) { |
40 return $variables['container']->get($value); | 40 return $variables['container']->get($value); |
41 }), | 41 }), |
43 new ExpressionFunction('parameter', function ($arg) { | 43 new ExpressionFunction('parameter', function ($arg) { |
44 return sprintf('$this->getParameter(%s)', $arg); | 44 return sprintf('$this->getParameter(%s)', $arg); |
45 }, function (array $variables, $value) { | 45 }, function (array $variables, $value) { |
46 return $variables['container']->getParameter($value); | 46 return $variables['container']->getParameter($value); |
47 }), | 47 }), |
48 ); | 48 ]; |
49 } | 49 } |
50 } | 50 } |