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
bool | 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, mixed $sourceValue, string $destId, mixed $destValue = null, string $reference = null) Connects 2 nodes together in the Graph. |
Details
bool hasNode(string $id)
Checks if the graph has a specific node.
Parameters
string | $id | Id to check |
Return Value
bool |
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 |
ServiceReferenceGraphNode[] getNodes()
Returns all nodes.
Return Value
ServiceReferenceGraphNode[] |
clear()
Clears all nodes.
connect(string $sourceId, mixed $sourceValue, string $destId, mixed $destValue = null, string $reference = null)
Connects 2 nodes together in the Graph.
Parameters
string | $sourceId | |
mixed | $sourceValue | |
string | $destId | |
mixed | $destValue | |
string | $reference |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.html