PATH:
opt
/
alt
/
php53
/
usr
/
share
/
pear
/
Symfony
/
Component
/
DependencyInjection
/
Compiler
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * 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\Exception\ParameterNotFoundException; /** * Resolves all parameter placeholders "%somevalue%" to their real values. * * @author Johannes M. Schmitt <schmittjoh@gmail.com> */ class ResolveParameterPlaceHoldersPass implements CompilerPassInterface { /** * Processes the ContainerBuilder to resolve parameter placeholders. * * @param ContainerBuilder $container * * @throws ParameterNotFoundException */ public function process(ContainerBuilder $container) { $parameterBag = $container->getParameterBag(); foreach ($container->getDefinitions() as $id => $definition) { try { $definition->setClass($parameterBag->resolveValue($definition->getClass())); $definition->setFile($parameterBag->resolveValue($definition->getFile())); $definition->setArguments($parameterBag->resolveValue($definition->getArguments())); $calls = array(); foreach ($definition->getMethodCalls() as $name => $arguments) { $calls[$parameterBag->resolveValue($name)] = $parameterBag->resolveValue($arguments); } $definition->setMethodCalls($calls); $definition->setProperties($parameterBag->resolveValue($definition->getProperties())); } catch (ParameterNotFoundException $e) { $e->setSourceId($id); throw $e; } } $aliases = array(); foreach ($container->getAliases() as $name => $target) { $aliases[$parameterBag->resolveValue($name)] = $parameterBag->resolveValue($target); } $container->setAliases($aliases); $parameterBag->resolve(); } }
[-] Compiler.php
[edit]
[-] RepeatedPass.php
[edit]
[-] ReplaceAliasByActualDefinitionPass.php
[edit]
[-] PassConfig.php
[edit]
[-] ServiceReferenceGraphEdge.php
[edit]
[-] CheckReferenceValidityPass.php
[edit]
[-] RemoveUnusedDefinitionsPass.php
[edit]
[-] RemovePrivateAliasesPass.php
[edit]
[-] RemoveAbstractDefinitionsPass.php
[edit]
[-] InlineServiceDefinitionsPass.php
[edit]
[+]
..
[-] ResolveInvalidReferencesPass.php
[edit]
[-] ResolveReferencesToAliasesPass.php
[edit]
[-] ServiceReferenceGraph.php
[edit]
[-] ServiceReferenceGraphNode.php
[edit]
[-] ResolveDefinitionTemplatesPass.php
[edit]
[-] ResolveParameterPlaceHoldersPass.php
[edit]
[-] MergeExtensionConfigurationPass.php
[edit]
[-] CompilerPassInterface.php
[edit]
[-] RepeatablePassInterface.php
[edit]
[-] CheckExceptionOnInvalidReferenceBehaviorPass.php
[edit]
[-] CheckCircularReferencesPass.php
[edit]
[-] CheckDefinitionValidityPass.php
[edit]
[-] AnalyzeServiceReferencesPass.php
[edit]
[-] LoggingFormatter.php
[edit]