XOOPS API 2.5.11 Beta1  UI v0.5
Réalisé par monxoops.fr
Référence de la classe Inline

Fonctions membres publiques statiques

static parse ($value, $exceptionOnInvalidType=false, $objectSupport=false, $objectForMap=false, $references=array())
 
static dump ($value, $exceptionOnInvalidType=false, $objectSupport=false)
 
static isHash (array $value)
 
static parseScalar ($scalar, $delimiters=null, $stringDelimiters=array('"', "'"), &$i = 0, $evaluate = true, $references = array())
 

Champs de données

const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'
 

Fonctions membres privées statiques

static dumpArray ($value, $exceptionOnInvalidType, $objectSupport)
 
static parseQuotedScalar ($scalar, &$i)
 
static parseSequence ($sequence, &$i=0, $references=array())
 
static parseMapping ($mapping, &$i=0, $references=array())
 
static evaluateScalar ($scalar, $references=array())
 
static getTimestampRegex ()
 
static getHexRegex ()
 

Attributs privés statiques

static $exceptionOnInvalidType = false
 
static $objectSupport = false
 
static $objectForMap = false
 

Description détaillée

Inline implements a YAML parser/dumper for the YAML inline syntax.

Auteur
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Documentation des fonctions membres

◆ dump()

static dump (   $value,
  $exceptionOnInvalidType = false,
  $objectSupport = false 
)
static

Dumps a given PHP variable to a YAML string.

Paramètres
mixed$valueThe PHP variable to convert
bool$exceptionOnInvalidTypeTrue if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
bool$objectSupportTrue if object support is enabled, false otherwise
Renvoie
string The YAML string representing the PHP value
Exceptions
DumpExceptionWhen trying to dump PHP resource
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ dumpArray()

static dumpArray (   $value,
  $exceptionOnInvalidType,
  $objectSupport 
)
staticprivate

Dumps a PHP array to a YAML string.

Paramètres
array$valueThe PHP array to dump
bool$exceptionOnInvalidTypeTrue if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
bool$objectSupportTrue if object support is enabled, false otherwise
Renvoie
string The YAML string representing the PHP array
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ evaluateScalar()

static evaluateScalar (   $scalar,
  $references = array() 
)
staticprivate

Evaluates scalars and replaces magic values.

Paramètres
string$scalar
array$references
Renvoie
mixed The evaluated YAML string
Exceptions
ParseExceptionwhen object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ getHexRegex()

static getHexRegex ( )
staticprivate

Gets a regex that matches a YAML number in hexadecimal notation.

Renvoie
string

◆ getTimestampRegex()

static getTimestampRegex ( )
staticprivate

Gets a regex that matches a YAML date.

Renvoie
string The regular expression
Voir également
http://www.yaml.org/spec/1.2/spec.html#id2761573

◆ isHash()

static isHash ( array  $value)
static

Check if given array is hash or just normal indexed array.

+ Voici le graphe des appelants de cette fonction :

◆ parse()

static parse (   $value,
  $exceptionOnInvalidType = false,
  $objectSupport = false,
  $objectForMap = false,
  $references = array() 
)
static

Converts a YAML string to a PHP value.

Paramètres
string$valueA YAML string
bool$exceptionOnInvalidTypeTrue if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
bool$objectSupportTrue if object support is enabled, false otherwise
bool$objectForMapTrue if maps should return a stdClass instead of array()
array$referencesMapping of variable names to values
Renvoie
mixed A PHP value
Exceptions
ParseException
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ parseMapping()

static parseMapping (   $mapping,
$i = 0,
  $references = array() 
)
staticprivate

Parses a YAML mapping.

Paramètres
string$mapping
int&$i
array$references
Renvoie
array|\stdClass
Exceptions
ParseExceptionWhen malformed inline YAML string is parsed
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ parseQuotedScalar()

static parseQuotedScalar (   $scalar,
$i 
)
staticprivate

Parses a YAML quoted scalar.

Paramètres
string$scalar
int&$i
Renvoie
string
Exceptions
ParseExceptionWhen malformed inline YAML string is parsed
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ parseScalar()

static parseScalar (   $scalar,
  $delimiters = null,
  $stringDelimiters = array('"', "'"),
$i = 0,
  $evaluate = true,
  $references = array() 
)
static

Parses a YAML scalar.

Paramètres
string$scalar
string[]$delimiters
string[]$stringDelimiters
int&$i
bool$evaluate
array$references
Renvoie
string
Exceptions
ParseExceptionWhen malformed inline YAML string is parsed
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

◆ parseSequence()

static parseSequence (   $sequence,
$i = 0,
  $references = array() 
)
staticprivate

Parses a YAML sequence.

Paramètres
string$sequence
int&$i
array$references
Renvoie
array
Exceptions
ParseExceptionWhen malformed inline YAML string is parsed
+ Voici le graphe d'appel pour cette fonction :
+ Voici le graphe des appelants de cette fonction :

Documentation des champs

◆ $exceptionOnInvalidType

$exceptionOnInvalidType = false
staticprivate

◆ $objectForMap

$objectForMap = false
staticprivate

◆ $objectSupport

$objectSupport = false
staticprivate

◆ REGEX_QUOTED_STRING

const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'

La documentation de cette classe a été générée à partir du fichier suivant :