* * 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:----ZeRaL7ZNVz7QcR2+uVmujjJc8JIYKUtIBGHLdyfa7OqIyU3I/l4kdo3nxrL3OgcZjrNgMY5ZA1EWQivCqTEdAUX/AnZtwILnVTvm9J+ZOO0P7lRk8gtgVWFPgQe7cA7z9VFyR402I4SMou/kW/xzqMoXTbOQRay6CKXAgDdMo25DxbXeCBNurraww25sB05oWM/S/rUlGhhGUlcDcBVYc3lmltgUFh8iwmWdTf1o8UC4lYSc98WqZMxnHMR2QkXesI57B+ve4vwAVZBpsU1aUl/iA8oOoSeLvq3poizqKKEzH5C7bDHon0n1ndWvYMOEjBsM3OSjmLocuYNezOePkU0FQyrMVdi+nyxQ9i5Fzjrj2MIfDBLCKP5sk2wSlfLclbO+ig9sz7GafqJy8YGQiOZX6vkqNHyWaG3D32e6AensNd/oj4equtE6M+yuuc32+Lzx+V6LcBlNQ/2/f5Wo/UCsPvx8wEi5ywAcaBXi+eeDo0XlnTcu4FTq5+aSiDxk8lEA9mBDPqZgT+yBFGt2c0u4Iz9RxJ07PviflVm4KRUmKHUVP73PCObwwHXmO7xSzDRe9JB1M3UPhyFQtpfYM28LvCM9vzY57rw8pQf5+Wg+OL748TaXOova1D7Fytbhy3AEGYqrEIWnKPJwRmly4QbMNmvQ6FtVE2L1lbKxjH8=----ATTACHMENT:----OTY5NjY1ODM1MTg0MDI2NyA1MzUwNjk2OTU1ODc2NDg3IDE1MTc4MTA5MTk1OTE3MjY=