class ServiceReferenceGraph

This is a directed graph of your services.

This information can be used by your compiler passes instead of collecting it themselves which improves performance quite a lot.

Methods

bool
hasNode(string $id)

Checks if the graph has a specific node.

getNode(string $id)

Gets a node by identifier.

getNodes()

Returns all nodes.

clear()

Clears all nodes.

connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null)

Connects 2 nodes together in the Graph.

Details

at line line 38
bool hasNode(string $id)

Checks if the graph has a specific node.

Parameters

string $id Id to check

Return Value

bool

at line line 52
ServiceReferenceGraphNode getNode(string $id)

Gets a node by identifier.

Parameters

string $id The id to retrieve

Return Value

ServiceReferenceGraphNode

Exceptions

InvalidArgumentException if no node matches the supplied identifier

at line line 66
ServiceReferenceGraphNode[] getNodes()

Returns all nodes.

Return Value

ServiceReferenceGraphNode[]

at line line 74
clear()

Clears all nodes.

at line line 89
connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null)

Connects 2 nodes together in the Graph.

Parameters

$sourceId
$sourceValue
$destId
$destValue
$reference