Class

Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraph

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

Boolean hasNode(string $id)

Checks if the graph has a specific node.

ServiceReferenceGraphNode getNode(string $id)

Gets a node by identifier.

ServiceReferenceGraphNode[] getNodes()

Returns all nodes.

clear()

Clears all nodes.

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

Connects 2 nodes together in the Graph.

Details

at line 38
public Boolean hasNode(string $id)

Checks if the graph has a specific node.

Parameters

string $id Id to check

Return Value

Boolean

at line 52
public ServiceReferenceGraphNode getNode(string $id)

Gets a node by identifier.

Parameters

string $id The id to retrieve

Return Value

ServiceReferenceGraphNode The node matching the supplied identifier

Exceptions

InvalidArgumentException if no node matches the supplied identifier

at line 66
public ServiceReferenceGraphNode[] getNodes()

Returns all nodes.

Return Value

ServiceReferenceGraphNode[] An array of all ServiceReferenceGraphNode objects

at line 74
public clear()

Clears all nodes.

at line 88
public connect(string $sourceId, string $sourceValue, string $destId, string $destValue = null, string $reference = null)

Connects 2 nodes together in the Graph.

Parameters

string $sourceId
string $sourceValue
string $destId
string $destValue
string $reference