ServiceReferenceGraph
in package
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.
Tags
Table of Contents
- $nodes : array<string|int, ServiceReferenceGraphNode>
- clear() : mixed
- Clears all nodes.
- connect() : mixed
- Connects 2 nodes together in the Graph.
- getNode() : ServiceReferenceGraphNode
- Gets a node by identifier.
- getNodes() : array<string|int, ServiceReferenceGraphNode>
- Returns all nodes.
- hasNode() : bool
- createNode() : ServiceReferenceGraphNode
Properties
$nodes
private
array<string|int, ServiceReferenceGraphNode>
$nodes
= []
Methods
clear()
Clears all nodes.
public
clear() : mixed
Return values
mixed —connect()
Connects 2 nodes together in the Graph.
public
connect(string|null $sourceId, mixed $sourceValue, string|null $destId[, mixed $destValue = null ][, Reference|null $reference = null ][, bool $lazy = false ][, bool $weak = false ][, bool $byConstructor = false ]) : mixed
Parameters
- $sourceId : string|null
- $sourceValue : mixed
- $destId : string|null
- $destValue : mixed = null
- $reference : Reference|null = null
- $lazy : bool = false
- $weak : bool = false
- $byConstructor : bool = false
Return values
mixed —getNode()
Gets a node by identifier.
public
getNode(string $id) : ServiceReferenceGraphNode
Parameters
- $id : string
Tags
Return values
ServiceReferenceGraphNode —getNodes()
Returns all nodes.
public
getNodes() : array<string|int, ServiceReferenceGraphNode>
Return values
array<string|int, ServiceReferenceGraphNode> —hasNode()
public
hasNode(string $id) : bool
Parameters
- $id : string
Return values
bool —createNode()
private
createNode(string $id, mixed $value) : ServiceReferenceGraphNode
Parameters
- $id : string
- $value : mixed