Container::getParameter

public Container::getParameter($name)

File

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

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];
}
doc_Drupal
2016-10-29 08:56:38
Comments
Leave a Comment

Please login to continue.