You are here

private function ResolveReferencesToAliasesPass::processArguments in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php \Symfony\Component\DependencyInjection\Compiler\ResolveReferencesToAliasesPass::processArguments()

Processes the arguments to replace aliases.

Parameters

array $arguments An array of References:

Return value

array An array of References

1 call to ResolveReferencesToAliasesPass::processArguments()
ResolveReferencesToAliasesPass::process in vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
Processes the ContainerBuilder to replace references to aliases with actual service references.

File

vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php, line 62

Class

ResolveReferencesToAliasesPass
Replaces all references to aliases with references to the actual service.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

private function processArguments(array $arguments) {
  foreach ($arguments as $k => $argument) {
    if (is_array($argument)) {
      $arguments[$k] = $this
        ->processArguments($argument);
    }
    elseif ($argument instanceof Reference) {
      $defId = $this
        ->getDefinitionId($id = (string) $argument);
      if ($defId !== $id) {
        $arguments[$k] = new Reference($defId, $argument
          ->getInvalidBehavior(), $argument
          ->isStrict());
      }
    }
  }
  return $arguments;
}