private function YamlDumper::prepareParameters in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php \Symfony\Component\DependencyInjection\Dumper\YamlDumper::prepareParameters()
Prepares parameters.
Parameters
array $parameters:
bool $escape:
Return value
array
1 call to YamlDumper::prepareParameters()
- YamlDumper::addParameters in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ YamlDumper.php - Adds parameters.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ YamlDumper.php, line 307
Class
- YamlDumper
- YamlDumper dumps a service container as a YAML string.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function prepareParameters($parameters, $escape = true) {
$filtered = array();
foreach ($parameters as $key => $value) {
if (is_array($value)) {
$value = $this
->prepareParameters($value, $escape);
}
elseif ($value instanceof Reference || is_string($value) && 0 === strpos($value, '@')) {
$value = '@' . $value;
}
$filtered[$key] = $value;
}
return $escape ? $this
->escape($filtered) : $filtered;
}