class Unescaper (View source)

Unescaper encapsulates unescaping rules for single and double-quoted YAML strings.

Constants

REGEX_ESCAPED_CHARACTER

Regex fragment that matches an escaped character in a double quoted string.

Methods

string
unescapeSingleQuotedString(string $value)

Unescapes a single quoted string.

string
unescapeDoubleQuotedString(string $value)

Unescapes a double quoted string.

Details

string unescapeSingleQuotedString(string $value)

Unescapes a single quoted string.

Parameters

string $value A single quoted string

Return Value

string The unescaped string

string unescapeDoubleQuotedString(string $value)

Unescapes a double quoted string.

Parameters

string $value A double quoted string

Return Value

string The unescaped string