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)

No description

getNode(string $id)

Gets a node by identifier.

array
getNodes()

Returns all nodes.

clear()

Clears all nodes.

connect(string|null $sourceId, $sourceValue, string|null $destId, $destValue = null, $reference = null, bool $lazy = false, bool $weak = false, bool $byConstructor = false)

Connects 2 nodes together in the Graph.

Details

at line 33
bool hasNode(string $id)

Parameters

string $id

Return Value

bool

at line 43
ServiceReferenceGraphNode getNode(string $id)

Gets a node by identifier.

Parameters

string $id

Return Value

ServiceReferenceGraphNode

Exceptions

InvalidArgumentException if no node matches the supplied identifier

at line 57
array getNodes()

Returns all nodes.

Return Value

array

at line 65
clear()

Clears all nodes.

at line 76
connect(string|null $sourceId, $sourceValue, string|null $destId, $destValue = null, $reference = null, bool $lazy = false, bool $weak = false, bool $byConstructor = false)

Connects 2 nodes together in the Graph.

Parameters

string|null $sourceId
$sourceValue
string|null $destId
$destValue
$reference
bool $lazy
bool $weak
bool $byConstructor