private function XmlDumper::escape in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php \Symfony\Component\DependencyInjection\Dumper\XmlDumper::escape()
Escapes arguments.
Parameters
array $arguments:
Return value
array
1 call to XmlDumper::escape()
- XmlDumper::addParameters in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ XmlDumper.php - Adds parameters.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ XmlDumper.php, line 314
Class
- XmlDumper
- XmlDumper dumps a service container as an XML 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;
}