You are here

public function ParameterBag::add in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php \Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::add()

Adds parameters to the service container parameters.

@api

Parameters

array $parameters An array of parameters:

Overrides ParameterBagInterface::add

1 call to ParameterBag::add()
ParameterBag::__construct in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php
Constructor.
1 method overrides ParameterBag::add()
FrozenParameterBag::add in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php
@api

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php, line 59

Class

ParameterBag
Holds parameters.

Namespace

Symfony\Component\DependencyInjection\ParameterBag

Code

public function add(array $parameters) {
  foreach ($parameters as $key => $value) {
    $this->parameters[strtolower($key)] = $value;
  }
}