Symfony\Component\Yaml\Unescaper
Unescaper encapsulates unescaping rules for single and double-quoted YAML strings.
- Author: Matthew Lewinski <matthew@lewinski.org>
Synopsis
class Unescaper
{
- // constants
- const ENCODING = 'UTF-8';
- const REGEX_ESCAPED_CHARACTER = "\\\\([0abt\tnvfre \\\"\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})";
- // methods
- public string unescapeSingleQuotedString()
- public string unescapeDoubleQuotedString()
- public string unescapeCharacter()
- private string convertEncoding()
Constants
Name | Value |
---|---|
ENCODING | 'UTF-8' |
REGEX_ESCAPED_CHARACTER | "\\\\([0abt\tnvfre \\\"\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})" |
Methods
private
- convertEncoding() — Convert a string from one encoding to another.
public
- unescapeCharacter() — Unescapes a character that was found in a double-quoted string
- unescapeDoubleQuotedString() — Unescapes a double quoted string.
- unescapeSingleQuotedString() — Unescapes a single quoted string.