You are here

public function ServiceReferenceGraph::getNode in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php \Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraph::getNode()

Gets a node by identifier.

Parameters

string $id The id to retrieve:

Return value

ServiceReferenceGraphNode The node matching the supplied identifier

Throws

InvalidArgumentException if no node matches the supplied identifier

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php, line 52

Class

ServiceReferenceGraph
This is a directed graph of your services.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

public function getNode($id) {
  if (!isset($this->nodes[$id])) {
    throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id));
  }
  return $this->nodes[$id];
}