API - XOOPS 2.5.11 Beta 2
By monxoops.fr
Unescaper Class Reference

Public Member Functions

 unescapeSingleQuotedString ($value)
 
 unescapeDoubleQuotedString ($value)
 
 unescapeCharacter ($value)
 

Data Fields

const ENCODING = 'UTF-8'
 
const REGEX_ESCAPED_CHARACTER = '\\\\‍(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'
 

Detailed Description

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

Author
Matthew Lewinski matth.nosp@m.ew@l.nosp@m.ewins.nosp@m.ki.o.nosp@m.rg

Member Function Documentation

◆ unescapeCharacter()

unescapeCharacter (   $value)

Unescapes a character that was found in a double-quoted string.

Parameters
string$valueAn escaped character
Returns
string The unescaped character

◆ unescapeDoubleQuotedString()

unescapeDoubleQuotedString (   $value)

Unescapes a double quoted string.

Parameters
string$valueA double quoted string
Returns
string The unescaped string

◆ unescapeSingleQuotedString()

unescapeSingleQuotedString (   $value)

Unescapes a single quoted string.

Parameters
string$valueA single quoted string
Returns
string The unescaped string

Field Documentation

◆ ENCODING

const ENCODING = 'UTF-8'

Parser and Inline assume UTF-8 encoding, so escaped Unicode characters must be converted to that encoding.

Deprecated:
since version 2.5, to be removed in 3.0

◆ REGEX_ESCAPED_CHARACTER

const REGEX_ESCAPED_CHARACTER = '\\\\‍(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'

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


The documentation for this class was generated from the following file: