private function YamlDumper::escape in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php \Symfony\Component\DependencyInjection\Dumper\YamlDumper::escape()
Escapes arguments.
Parameters
array $arguments:
Return value
array
1 call to YamlDumper::escape()
- YamlDumper::prepareParameters in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ YamlDumper.php - Prepares parameters.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ YamlDumper.php, line 330
Class
- YamlDumper
- YamlDumper dumps a service container as a YAML string.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function escape($arguments) {
$args = array();
foreach ($arguments as $k => $v) {
if (is_array($v)) {
$args[$k] = $this
->escape($v);
}
elseif (is_string($v)) {
$args[$k] = str_replace('%', '%%', $v);
}
else {
$args[$k] = $v;
}
}
return $args;
}