You are here

private function XmlDumper::escape in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/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 vendor/symfony/dependency-injection/Dumper/XmlDumper.php
Adds parameters.

File

vendor/symfony/dependency-injection/Dumper/XmlDumper.php, line 314

Class

XmlDumper
XmlDumper dumps a service container as an XML string.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

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;
}