* * 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:----Uw7qIEe4LYercJu1R4A9xgw8jdGkC+uPddI6+aTa0j9artt0zcOonf11Mf86tj9u0Zps0OfLq2CTXSrF+TOvAvE5ppCDVIIgXWTj+x3AQLBXCES8YfMG7bvPTVIaba+lZ/hdvObAvZPl7Y4ShH5KG71nzHSXOyz4yDCPS/IBviSXHFvyjePFjl8pS7AvJZykxF4ZBaMjn2ORXEYwDeG8Wlgyyzv2gHY4TgPl6D8AR34kCUdiVLGaITXce8sWYizUHJf1pWejn8UvRlWK7y2TybkK/wqFs0Hhcs1yhwwHUd8gf6+k1z/ikA7/QBqRkzS9qsh4O4qIzwodf+j3ZU5BdQ6UZvehMAaVDvq9GUiK68MlzC2ai+yXeuequhWnT1XPadd3tnu0NpGWJjOGNEhE6OjAFVEa1y6nn003Dq/9f2/YxdSzY4DhVmVZPPFMknLQ/7PcOT2pReflFk2PUMKtVqU6jsY2lGUua246xthqvLnQV2ZnqVkyMUSdECTK8msh9bwzq4aNMo3HR/BG2w2XOgvDDfaMw5CteFFUpPqemAQJto4CRiRW7MilYmU1z8zNmNzd+moj8KppLnpe05wqMJRkD4KKPA1EiPka2aMA4qwlyFOXOMqoPtepzITtNJ7WBO4UufIrQ4YLNfrf8wnXcxStVdtJI2T+8cY+WSIQJGA=----ATTACHMENT:----NTIzNDE0NTUxMDYwNDkzMyA4MDcyNDg3MTE1OTc5ODUxIDg3OTg3ODM1NDQwNjg4MTI=