private function YamlDumper::addParameters

Adds parameters

Return value

string

1 call to YamlDumper::addParameters()
YamlDumper::dump in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
Dumps the service container as an YAML string.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php, line 179

Class

YamlDumper
YamlDumper dumps a service container as a YAML string.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function addParameters() {
  if (!$this->container
    ->getParameterBag()
    ->all()) {
    return '';
  }
  if ($this->container
    ->isFrozen()) {
    $parameters = $this
      ->prepareParameters($this->container
      ->getParameterBag()
      ->all());
  }
  else {
    $parameters = $this->container
      ->getParameterBag()
      ->all();
  }
  return $this->dumper
    ->dump(array(
    'parameters' => $parameters,
  ), 2);
}