public function ParameterBag::resolve

Replaces parameter placeholders (%name%) by their values for all parameters.

Overrides ParameterBagInterface::resolve

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php, line 144

Class

ParameterBag
Holds parameters.

Namespace

Symfony\Component\DependencyInjection\ParameterBag

Code

public function resolve() {
  if ($this->resolved) {
    return;
  }
  $parameters = array();
  foreach ($this->parameters as $key => $value) {
    try {
      $value = $this
        ->resolveValue($value);
      $parameters[$key] = $this
        ->unescapeValue($value);
    } catch (ParameterNotFoundException $e) {
      $e
        ->setSourceKey($key);
      throw $e;
    }
  }
  $this->parameters = $parameters;
  $this->resolved = true;
}