You are here

public function ServiceReferenceGraph::connect in Zircon Profile 8

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

Connects 2 nodes together in the Graph.

Parameters

string $sourceId:

string $sourceValue:

string $destId:

string $destValue:

string $reference:

File

vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php, line 88

Class

ServiceReferenceGraph
This is a directed graph of your services.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null) {
  $sourceNode = $this
    ->createNode($sourceId, $sourceValue);
  $destNode = $this
    ->createNode($destId, $destValue);
  $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference);
  $sourceNode
    ->addOutEdge($edge);
  $destNode
    ->addInEdge($edge);
}