class Escaper
Escaper encapsulates escaping rules for single and double-quoted YAML strings.
Constants
| REGEX_CHARACTER_TO_ESCAPE |
|
Methods
| static Boolean |
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 Boolean |
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. |
Details
at line 48
static public Boolean
requiresDoubleQuoting(string $value)
Determines if a PHP value would require double quoting in YAML.
at line 60
static public string
escapeWithDoubleQuotes(string $value)
Escapes and surrounds a PHP value with double quotes.
at line 72
static public Boolean
requiresSingleQuoting(string $value)
Determines if a PHP value would require single quoting in YAML.
at line 84
static public string
escapeWithSingleQuotes(string $value)
Escapes and surrounds a PHP value with single quotes.