private function AnalyzeServiceReferencesPass::processArguments

Processes service definitions for arguments to find relationships for the service graph.

Parameters

array $arguments An array of Reference or Definition objects relating to service definitions:

1 call to AnalyzeServiceReferencesPass::processArguments()
AnalyzeServiceReferencesPass::process in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php
Processes a ContainerBuilder object to populate the service reference graph.

File

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

Class

AnalyzeServiceReferencesPass
Run this pass before passes that need to know more about the relation of your services.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

private function processArguments(array $arguments) {
  foreach ($arguments as $argument) {
    if (is_array($argument)) {
      $this
        ->processArguments($argument);
    }
    elseif ($argument instanceof Reference) {
      $this->graph
        ->connect($this->currentId, $this->currentDefinition, $this
        ->getDefinitionId((string) $argument), $this
        ->getDefinition((string) $argument), $argument);
    }
    elseif ($argument instanceof Definition) {
      $this
        ->processArguments($argument
        ->getArguments());
      $this
        ->processArguments($argument
        ->getMethodCalls());
      $this
        ->processArguments($argument
        ->getProperties());
    }
  }
}