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

Static Public Member Functions

static requiresDoubleQuoting ($value)
 
static escapeWithDoubleQuotes ($value)
 
static requiresSingleQuoting ($value)
 
static escapeWithSingleQuotes ($value)
 

Data Fields

const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"
 

Detailed Description

Escaper encapsulates escaping 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

◆ escapeWithDoubleQuotes()

static escapeWithDoubleQuotes (   $value)
static

Escapes and surrounds a PHP value with double quotes.

Parameters
string$valueA PHP value
Returns
string The quoted, escaped string
Here is the caller graph for this function:

◆ escapeWithSingleQuotes()

static escapeWithSingleQuotes (   $value)
static

Escapes and surrounds a PHP value with single quotes.

Parameters
string$valueA PHP value
Returns
string The quoted, escaped string
Here is the caller graph for this function:

◆ requiresDoubleQuoting()

static requiresDoubleQuoting (   $value)
static

Determines if a PHP value would require double quoting in YAML.

Parameters
string$valueA PHP value
Returns
bool True if the value would require double quotes
Here is the caller graph for this function:

◆ requiresSingleQuoting()

static requiresSingleQuoting (   $value)
static

Determines if a PHP value would require single quoting in YAML.

Parameters
string$valueA PHP value
Returns
bool True if the value would require single quotes
Here is the caller graph for this function:

Field Documentation

◆ REGEX_CHARACTER_TO_ESCAPE

const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"

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