You are here

private function YamlDumper::addParameters in Service Container 7.2

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

Adds parameters.

Return value

string

1 call to YamlDumper::addParameters()
YamlDumper::dump in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
Dumps the service container as an YAML string.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php, line 203

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 '';
  }
  $parameters = $this
    ->prepareParameters($this->container
    ->getParameterBag()
    ->all(), $this->container
    ->isFrozen());
  return $this->dumper
    ->dump(array(
    'parameters' => $parameters,
  ), 2);
}