class Escaper
Escaper encapsulates escaping rules for single and double-quoted YAML strings.
REGEX_CHARACTER_TO_ESCAPE |
static bool | requiresDoubleQuoting(string $value) Determines if a PHP value would require double quoting in YAML. | |
static string | escapeWithDoubleQuotes(string $value) Escapes and surrounds a PHP value with double quotes. | |
static bool | requiresSingleQuoting(string $value) Determines if a PHP value would require single quoting in YAML. | |
static string | escapeWithSingleQuotes(string $value) Escapes and surrounds a PHP value with single quotes. |
Determines if a PHP value would require double quoting in YAML.
string | $value | A PHP value |
bool | True if the value would require double quotes |
Escapes and surrounds a PHP value with double quotes.
string | $value | A PHP value |
string | The quoted, escaped string |
Determines if a PHP value would require single quoting in YAML.
string | $value | A PHP value |
bool | True if the value would require single quotes |
Escapes and surrounds a PHP value with single quotes.
string | $value | A PHP value |
string | The quoted, escaped string |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Yaml/Escaper.html