Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. YamlDumper.php

function YamlDumper::escape

1 call to YamlDumper::escape()
YamlDumper::prepareParameters in vendor/symfony/dependency-injection/Dumper/YamlDumper.php

File

vendor/symfony/dependency-injection/Dumper/YamlDumper.php, line 365

Class

YamlDumper
YamlDumper dumps a service container as a YAML string.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function escape(array $arguments) : array {
    $args = [];
    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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal