public function CheckCircularReferencesPass::process

Checks the ContainerBuilder object for circular references.

Parameters

ContainerBuilder $container The ContainerBuilder instances:

Overrides CompilerPassInterface::process

File

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

Class

CheckCircularReferencesPass
Checks your services for circular references

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

public function process(ContainerBuilder $container) {
  $graph = $container
    ->getCompiler()
    ->getServiceReferenceGraph();
  foreach ($graph
    ->getNodes() as $id => $node) {
    $this->currentId = $id;
    $this->currentPath = array(
      $id,
    );
    $this
      ->checkOutEdges($node
      ->getOutEdges());
  }
}