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

Breadcrumb

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

function Container::getParameter

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

Overrides ContainerInterface::getParameter

2 calls to Container::getParameter()
Container::resolveServicesAndParameters in core/lib/Drupal/Component/DependencyInjection/Container.php
Resolves arguments that represent services or variables to the real values.
PhpArrayContainer::resolveServicesAndParameters in core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php
Resolves arguments that represent services or variables to the real values.

File

core/lib/Drupal/Component/DependencyInjection/Container.php, line 322

Class

Container
Provides a container optimized for Drupal's needs.

Namespace

Drupal\Component\DependencyInjection

Code

public function getParameter($name) : array|bool|string|int|float|null {
    if (!\array_key_exists($name, $this->parameters)) {
        if (!$name) {
            throw new ParameterNotFoundException('');
        }
        throw new ParameterNotFoundException($name, NULL, NULL, NULL, $this->getParameterAlternatives($name));
    }
    return $this->parameters[$name];
}

API Navigation

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