public static function Escaper::escapeWithDoubleQuotes

Escapes and surrounds a PHP value with double quotes.

Parameters

string $value A PHP value:

Return value

string The quoted, escaped string

1 call to Escaper::escapeWithDoubleQuotes()
Inline::dump in drupal/core/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php
Dumps a given PHP variable to a YAML string.

File

drupal/core/vendor/symfony/yaml/Symfony/Component/Yaml/Escaper.php, line 60

Class

Escaper
Escaper encapsulates escaping rules for single and double-quoted YAML strings.

Namespace

Symfony\Component\Yaml

Code

public static function escapeWithDoubleQuotes($value) {
  return sprintf('"%s"', str_replace(self::$escapees, self::$escaped, $value));
}