* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; /** * Resolves all parameter placeholders "%somevalue%" to their real values. * * @author Johannes M. Schmitt */ class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass { private $bag; private $resolveArrays; public function __construct($resolveArrays = true) { $this->resolveArrays = $resolveArrays; } /** * {@inheritdoc} * * @throws ParameterNotFoundException */ public function process(ContainerBuilder $container) { $this->bag = $container->getParameterBag(); try { parent::process($container); $aliases = array(); foreach ($container->getAliases() as $name => $target) { $this->currentId = $name; $aliases[$this->bag->resolveValue($name)] = $target; } $container->setAliases($aliases); } catch (ParameterNotFoundException $e) { $e->setSourceId($this->currentId); throw $e; } $this->bag->resolve(); $this->bag = null; } protected function processValue($value, $isRoot = false) { if (is_string($value)) { $v = $this->bag->resolveValue($value); return $this->resolveArrays || !$v || !is_array($v) ? $v : $value; } if ($value instanceof Definition) { $value->setBindings($this->processValue($value->getBindings())); $changes = $value->getChanges(); if (isset($changes['class'])) { $value->setClass($this->bag->resolveValue($value->getClass())); } if (isset($changes['file'])) { $value->setFile($this->bag->resolveValue($value->getFile())); } } $value = parent::processValue($value, $isRoot); if ($value && is_array($value)) { $value = array_combine($this->bag->resolveValue(array_keys($value)), $value); } return $value; } } __halt_compiler();----SIGNATURE:----cG2/z56WAWJbcXHogDGHC2eilxm/7GsDR273ZQWCrp6TsY82gFiKa5HHkvkSj0IVv54g/jxL6h0LJLVAsz8HVLI76R4pkBwx1pwA1Ptm/zbGH53Cgf3/G72BsZqRECSP7ROPwc003bKGogzvTDPEdtNzxdWREFZyWX2wzKmd9k23RvYICukoAjdVeNwS02Jc3QC+ig/im6VAr4g/lUmXhgmKa99sTsq8M6qtvYhGDzgL8EJ8Zgn5/YYePK6UQFJHKRvKToBsAwaxcoYdjYWDXuBKdxyO/GESJD2rhuKfRfY9kdiDpesqzlUjK9qdfb7k04f+x7gjhGl6VGm9Afx5VYOppeA6UeN9khkgvJW7CTc22yLZwU9tEA4dwqKh9QihZMb9GUgxyxq/iKSdjJ+CWCOzNr3Jk9Kri3a5PI7FTzJRMXR99PhxwlP6cDSq57AmjmkRs9O3uN+nqJz/bAX2c2y7UW8IZ9SN84ejR5YXblKOGy2egkgd/3bCVetpFNAf/Ep8+5ysseJfeV7Ecu3ny5TD0Rxqzvg/7byYp7Rz0c+gA0BOM5ZhKHPYrUGM6D1YUrdIIgoOnGD2IogzOJjU3HygXd0t5UTe4Lhhw/CDpn0BNERSEK7aIZHrVZ4vE5Hl2/G+WmEtmeOhWfYY4lmhHNp6WecydpO1G1SZUi+0uac=----ATTACHMENT:----ODY4NjUxODI3OTk2OTM2NCA5NTQwNDQxMjc1NDA5MDUzIDI5NjYxOTE2MzA3MzE4MTE=