You are here

public function Container::getParameter in Service Container 7

Same name in this branch
  1. 7 lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container::getParameter()
  2. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Container.php \Symfony\Component\DependencyInjection\Container::getParameter()
Same name and namespace in other branches
  1. 7.2 lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container::getParameter()
2 calls to Container::getParameter()
Container::resolveServicesAndParameters in lib/Drupal/Component/DependencyInjection/Container.php
Resolves arguments that represent services or variables to the real values.
PhpArrayContainer::resolveServicesAndParameters in lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php
Resolves arguments that represent services or variables to the real values.

File

lib/Drupal/Component/DependencyInjection/Container.php, line 375
Contains \Drupal\Component\DependencyInjection\Container.

Class

Container
Provides a container optimized for Drupal's needs.

Namespace

Drupal\Component\DependencyInjection

Code

public function getParameter($name) {
  if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) {
    if (!$name) {
      throw new ParameterNotFoundException($name);
    }
    throw new ParameterNotFoundException($name, NULL, NULL, NULL, $this
      ->getParameterAlternatives($name));
  }
  return $this->parameters[$name];
}