* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection; use Symfony\Component\ExpressionLanguage\ExpressionFunction; use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; /** * Define some ExpressionLanguage functions. * * To get a service, use service('request'). * To get a parameter, use parameter('kernel.debug'). * * @author Fabien Potencier */ class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface { private $serviceCompiler; public function __construct(callable $serviceCompiler = null) { $this->serviceCompiler = $serviceCompiler; } public function getFunctions() { return array( new ExpressionFunction('service', $this->serviceCompiler ?: 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); }), ); } } __halt_compiler();----SIGNATURE:----FajXt+Pt3AlKdAOULQEQzyNHFadBCESS1EPf1PcSBf+odgSxeFzI9ddGQJo8lfV8P7YEFDeg40m3jQn9o7jwFbeJTQs4jf2F4WwDE56oq6dzjShThDSTsLi9gF6iu543RErKxVlQNEsUN+IAwtYMu61jVagAlqVW2jeNRJoHSXTPEMvSQJiGbrmaerTgarBgSZLz+2QNSK96eVzBPDZenpHfQAzAFzsG13D3ALf5H04HAEWekIKtPd2gDU88AdFSJcwN/vy9NrFu0973cZsDnrmP4y4jmYYDAKT99DNIKOVamUlcktgfHsBDqBHc035x+VV08wegOaH9eABPlWm/+h3u//5/92mDvPftly0mU1r3smFnkV7W+02ZQAgwWPx/DcFFCv0JYoEnTatnExpCAfX8RSCvxWu67g5AjRV5pCYJ1EPoTDLfBYIS1Nq00lYVCoLGM3wJ5R3vFW8KHGpcmMAWTB2XqJtCTaWZq0hnAKBEZXE74ftiqLLOmvCgVXj+pGRnjJFMuOFC0u2jY4pSqE4s3iqXNQhFiyOper8IsWXfQzq0ZO/bFwByQxbpLdxdSC6FWz6j6H89E88U5PWwWXmPFhXbTyS2/nVNdjJ7c78QLDgbMBmFJq2dyz0u2pWBUJCPkkM+mHs1SsWSMP+oQA7HtEispMHko65PWPi7LME=----ATTACHMENT:----ODIwODQyMjkyMTgyNDQ4OCA4NzMwMjEzNzIzMzcxMDM4IDYxNDkxMDU5MDI5MTEyOTQ=