You are here

private function ServiceReferenceGraph::createNode in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php \Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraph::createNode()

Creates a graph node.

Parameters

string $id:

string $value:

Return value

ServiceReferenceGraphNode

1 call to ServiceReferenceGraph::createNode()
ServiceReferenceGraph::connect in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php
Connects 2 nodes together in the Graph.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php, line 106

Class

ServiceReferenceGraph
This is a directed graph of your services.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

private function createNode($id, $value) {
  if (isset($this->nodes[$id]) && $this->nodes[$id]
    ->getValue() === $value) {
    return $this->nodes[$id];
  }
  return $this->nodes[$id] = new ServiceReferenceGraphNode($id, $value);
}