Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Inline

Fonctions membres publiques statiques

static initialize (int $flags, int $parsedLineNumber=null, string $parsedFilename=null)
 
static parse (string $value=null, int $flags=0, array &$references=[])
 
static dump ($value, int $flags=0)
 
static isHash ($value)
 
static parseScalar (string $scalar, int $flags=0, array $delimiters=null, int &$i=0, bool $evaluate=true, array &$references=[], bool &$isQuoted=null)
 
static evaluateBinaryScalar (string $scalar)
 

Champs de données

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

Attributs publics statiques

static $parsedLineNumber = -1
 
static $parsedFilename
 

Fonctions membres privées statiques

static dumpArray (array $value, int $flags)
 
static dumpNull (int $flags)
 
static parseQuotedScalar (string $scalar, int &$i=0)
 
static parseSequence (string $sequence, int $flags, int &$i=0, array &$references=[])
 
static parseMapping (string $mapping, int $flags, int &$i=0, array &$references=[])
 
static evaluateScalar (string $scalar, int $flags, array &$references=[], bool &$isQuotedString=null)
 
static parseTag (string $value, int &$i, int $flags)
 
static isBinaryString (string $value)
 
static getTimestampRegex ()
 
static getHexRegex ()
 

Attributs privés statiques

static $exceptionOnInvalidType = false
 
static $objectSupport = false
 
static $objectForMap = false
 
static $constantSupport = 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,
int  $flags = 0 
)
static

Dumps a given PHP variable to a YAML string.

Paramètres
mixed$valueThe PHP variable to convert
int$flagsA bit field of Yaml::DUMP_* constants to customize the dumped YAML string
Exceptions
DumpExceptionWhen trying to dump PHP resource

Références $key, $output, $val, $value, Yaml\DUMP_EXCEPTION_ON_INVALID_TYPE, Yaml\DUMP_OBJECT, Yaml\DUMP_OBJECT_AS_MAP, elseif, Escaper\escapeWithDoubleQuotes(), Escaper\escapeWithSingleQuotes(), null, Parser\preg_match(), Escaper\requiresDoubleQuoting(), et Escaper\requiresSingleQuoting().

Référencé par Dumper\dump().

◆ dumpArray()

static dumpArray ( array  $value,
int  $flags 
)
staticprivate

Dumps a PHP array to a YAML string.

Paramètres
array$valueThe PHP array to dump
int$flagsA bit field of Yaml::DUMP_* constants to customize the dumped YAML string

Références $key, $output, $val, $value, et Yaml\DUMP_EMPTY_ARRAY_AS_SEQUENCE.

◆ dumpNull()

static dumpNull ( int  $flags)
staticprivate

Références Yaml\DUMP_NULL_AS_TILDE.

◆ evaluateBinaryScalar()

static evaluateBinaryScalar ( string  $scalar)
static

Références Parser\preg_match().

Référencé par Parser\parseValue().

◆ evaluateScalar()

static evaluateScalar ( string  $scalar,
int  $flags,
array &  $references = [],
bool &  $isQuotedString = null 
)
staticprivate

Evaluates scalars and replaces magic values.

Renvoie
mixed
Exceptions
ParseExceptionwhen object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved

Références $i, $value, null, Yaml\PARSE_DATETIME, et Parser\preg_match().

◆ getHexRegex()

static getHexRegex ( )
staticprivate

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

◆ getTimestampRegex()

static getTimestampRegex ( )
staticprivate

Gets a regex that matches a YAML date.

Voir également
http://www.yaml.org/spec/1.2/spec.html#id2761573

◆ initialize()

static initialize ( int  $flags,
int  $parsedLineNumber = null,
string  $parsedFilename = null 
)
static

◆ isBinaryString()

static isBinaryString ( string  $value)
staticprivate

Références $value.

◆ isHash()

static isHash (   $value)
static

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

Paramètres
array | \ArrayObject | \stdClass$valueThe PHP array or array-like object to check

Références $key, $val, et $value.

Référencé par Dumper\dump().

◆ parse()

static parse ( string  $value = null,
int  $flags = 0,
array &  $references = [] 
)
static

Converts a YAML string to a PHP value.

Paramètres
string$valueA YAML string
int$flagsA bit field of PARSE_* constants to customize the YAML parser behavior
array$referencesMapping of variable names to values
Renvoie
mixed
Exceptions
ParseException

Références $i, $result, $value, Laminas\Diactoros\initialize(), et null.

Référencé par Parser\doParse(), et Parser\parseValue().

◆ parseMapping()

static parseMapping ( string  $mapping,
int  $flags,
int &  $i = 0,
array &  $references = [] 
)
staticprivate

Parses a YAML mapping.

Renvoie
array|
Exceptions
ParseExceptionWhen malformed inline YAML string is parsed

Références $i, $key, $output, $value, elseif, null, Parser\preg_match(), et Parser\REFERENCE_PATTERN.

◆ parseQuotedScalar()

static parseQuotedScalar ( string  $scalar,
int &  $i = 0 
)
staticprivate

Parses a YAML quoted scalar.

Exceptions
ParseExceptionWhen malformed inline YAML string is parsed

Références $i, $output, et Parser\preg_match().

◆ parseScalar()

static parseScalar ( string  $scalar,
int  $flags = 0,
array  $delimiters = null,
int &  $i = 0,
bool  $evaluate = true,
array &  $references = [],
bool &  $isQuoted = null 
)
static

Parses a YAML scalar.

Renvoie
mixed
Exceptions
ParseExceptionWhen malformed inline YAML string is parsed

Références $i, $output, $tmp, elseif, null, et Parser\preg_match().

Référencé par Parser\doParse().

◆ parseSequence()

static parseSequence ( string  $sequence,
int  $flags,
int &  $i = 0,
array &  $references = [] 
)
staticprivate

Parses a YAML sequence.

Exceptions
ParseExceptionWhen malformed inline YAML string is parsed

Références $i, $output, $value, null, Parser\preg_match(), et Parser\REFERENCE_PATTERN.

◆ parseTag()

static parseTag ( string  $value,
int &  $i,
int  $flags 
)
staticprivate

Références $i, $value, null, et Yaml\PARSE_CUSTOM_TAGS.

Documentation des champs

◆ $constantSupport

$constantSupport = false
staticprivate

◆ $exceptionOnInvalidType

$exceptionOnInvalidType = false
staticprivate

◆ $objectForMap

$objectForMap = false
staticprivate

◆ $objectSupport

$objectSupport = false
staticprivate

◆ $parsedFilename

$parsedFilename
static

Référencé par Inline\initialize().

◆ $parsedLineNumber

$parsedLineNumber = -1
static

◆ REGEX_QUOTED_STRING

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

Référencé par Parser\doParse().


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