You are here

public static function Escaper::requiresDoubleQuoting in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Escaper.php \Symfony\Component\Yaml\Escaper::requiresDoubleQuoting()

Determines if a PHP value would require double quoting in YAML.

Parameters

string $value A PHP value:

Return value

bool True if the value would require double quotes.

1 call to Escaper::requiresDoubleQuoting()
Inline::dump in modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Inline.php
Dumps a given PHP variable to a YAML string.

File

modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Escaper.php, line 49

Class

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

Namespace

Symfony\Component\Yaml

Code

public static function requiresDoubleQuoting($value) {
  return preg_match('/' . self::REGEX_CHARACTER_TO_ESCAPE . '/u', $value);
}