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

Breadcrumb

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

function ContainerInterface::get

Same name in this branch
  1. 11.1.x vendor/symfony/dependency-injection/ContainerInterface.php \Symfony\Component\DependencyInjection\ContainerInterface::get()

Finds an entry of the container by its identifier and returns it.

Parameters

string $id Identifier of the entry to look for.:

Return value

mixed Entry.

Throws

NotFoundExceptionInterface No entry was found for **this** identifier.

ContainerExceptionInterface Error while retrieving the entry.

2 methods override ContainerInterface::get()
ContainerInterface::get in vendor/symfony/dependency-injection/ContainerInterface.php
@template B of self::*_REFERENCE
ServiceProviderInterface::get in vendor/symfony/service-contracts/ServiceProviderInterface.php

File

vendor/psr/container/src/ContainerInterface.php, line 22

Class

ContainerInterface
Describes the interface of a container that exposes methods to read its entries.

Namespace

Psr\Container

Code

public function get(string $id);

API Navigation

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