public function ProjectServiceContainer::getParameter

Gets a parameter.

@api

Parameters

string $name The parameter name:

Return value

mixed The parameter value

Throws

InvalidArgumentException if the parameter is not defined

Overrides Container::getParameter

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php, line 54

Class

ProjectServiceContainer
ProjectServiceContainer

Code

public function getParameter($name) {
  $name = strtolower($name);
  if (!array_key_exists($name, $this->parameters)) {
    throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
  }
  return $this->parameters[$name];
}