private function CheckCircularReferencesPass::checkOutEdges in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php \Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass::checkOutEdges()
Checks for circular references.
Parameters
ServiceReferenceGraphEdge[] $edges An array of Edges:
Throws
ServiceCircularReferenceException When a circular reference is found.
1 call to CheckCircularReferencesPass::checkOutEdges()
- CheckCircularReferencesPass::process in vendor/
symfony/ dependency-injection/ Compiler/ CheckCircularReferencesPass.php - Checks the ContainerBuilder object for circular references.
File
- vendor/
symfony/ dependency-injection/ Compiler/ CheckCircularReferencesPass.php, line 56
Class
- CheckCircularReferencesPass
- Checks your services for circular references.
Namespace
Symfony\Component\DependencyInjection\CompilerCode
private function checkOutEdges(array $edges) {
foreach ($edges as $edge) {
$node = $edge
->getDestNode();
$id = $node
->getId();
if (empty($this->checkedNodes[$id])) {
$searchKey = array_search($id, $this->currentPath);
$this->currentPath[] = $id;
if (false !== $searchKey) {
throw new ServiceCircularReferenceException($id, array_slice($this->currentPath, $searchKey));
}
$this
->checkOutEdges($node
->getOutEdges());
$this->checkedNodes[$id] = true;
array_pop($this->currentPath);
}
}
}