Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ServiceReferenceGraph.php

function ServiceReferenceGraph::getNode

Gets a node by identifier.

Throws

InvalidArgumentException if no node matches the supplied identifier

File

vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php, line 44

Class

ServiceReferenceGraph
This is a directed graph of your services.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal