public function ServiceReferenceGraph::connect

Connects 2 nodes together in the Graph.

Parameters

string $sourceId:

string $sourceValue:

string $destId:

string $destValue:

string $reference:

File

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

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);
}