private function ReplaceAliasByActualDefinitionPass::updateArgumentReferences in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php \Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass::updateArgumentReferences()
Updates argument references.
Parameters
array $arguments An array of Arguments:
string $currentId The alias identifier:
string $newId The identifier the alias points to:
Return value
array
1 call to ReplaceAliasByActualDefinitionPass::updateArgumentReferences()
- ReplaceAliasByActualDefinitionPass::updateReferences in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Compiler/ ReplaceAliasByActualDefinitionPass.php - Updates references to remove aliases.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Compiler/ ReplaceAliasByActualDefinitionPass.php, line 110
Class
- ReplaceAliasByActualDefinitionPass
- Replaces aliases with actual service definitions, effectively removing these aliases.
Namespace
Symfony\Component\DependencyInjection\CompilerCode
private function updateArgumentReferences(array $arguments, $currentId, $newId) {
foreach ($arguments as $k => $argument) {
if (is_array($argument)) {
$arguments[$k] = $this
->updateArgumentReferences($argument, $currentId, $newId);
}
elseif ($argument instanceof Reference) {
if ($currentId === (string) $argument) {
$arguments[$k] = new Reference($newId, $argument
->getInvalidBehavior());
$this->compiler
->addLogMessage($this->formatter
->formatUpdateReference($this, $this->sourceId, $currentId, $newId));
}
}
}
return $arguments;
}