private function 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 drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php
Processes the ContainerBuilder to replace references to aliases with actual service references.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php, line 61

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;
}