You are here

public function CheckCircularReferencesPass::process in Zircon Profile 8

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

Checks the ContainerBuilder object for circular references.

Parameters

ContainerBuilder $container The ContainerBuilder instances:

Overrides CompilerPassInterface::process

File

vendor/symfony/dependency-injection/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();
  $this->checkedNodes = array();
  foreach ($graph
    ->getNodes() as $id => $node) {
    $this->currentPath = array(
      $id,
    );
    $this
      ->checkOutEdges($node
      ->getOutEdges());
  }
}