|
| 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()) |
| |
|
| const | REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')' |
| |
Inline implements a YAML parser/dumper for the YAML inline syntax.
- Author
- Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
◆ dump()
| static dump |
( |
|
$value, |
|
|
|
$exceptionOnInvalidType = false, |
|
|
|
$objectSupport = false |
|
) |
| |
|
static |
Dumps a given PHP variable to a YAML string.
- Parameters
-
| mixed | $value | The PHP variable to convert |
| bool | $exceptionOnInvalidType | True if an exception must be thrown on invalid types (a PHP resource or object), false otherwise |
| bool | $objectSupport | True if object support is enabled, false otherwise |
- Returns
- string The YAML string representing the PHP value
- Exceptions
-
| DumpException | When trying to dump PHP resource |
◆ isHash()
| static isHash |
( |
array |
$value | ) |
|
|
static |
Check if given array is hash or just normal indexed array.
◆ parse()
| static parse |
( |
|
$value, |
|
|
|
$exceptionOnInvalidType = false, |
|
|
|
$objectSupport = false, |
|
|
|
$objectForMap = false, |
|
|
|
$references = array() |
|
) |
| |
|
static |
Converts a YAML string to a PHP value.
- Parameters
-
| string | $value | A YAML string |
| bool | $exceptionOnInvalidType | True if an exception must be thrown on invalid types (a PHP resource or object), false otherwise |
| bool | $objectSupport | True if object support is enabled, false otherwise |
| bool | $objectForMap | True if maps should return a stdClass instead of array() |
| array | $references | Mapping of variable names to values |
- Returns
- mixed A PHP value
- Exceptions
-
◆ parseScalar()
| static parseScalar |
( |
|
$scalar, |
|
|
|
$delimiters = null, |
|
|
|
$stringDelimiters = array('"', "'"), |
|
|
& |
$i = 0, |
|
|
|
$evaluate = true, |
|
|
|
$references = array() |
|
) |
| |
|
static |
Parses a YAML scalar.
- Parameters
-
| string | $scalar | |
| string[] | $delimiters | |
| string[] | $stringDelimiters | |
| int | &$i | |
| bool | $evaluate | |
| array | $references | |
- Returns
- string
- Exceptions
-
| ParseException | When malformed inline YAML string is parsed |
◆ REGEX_QUOTED_STRING
| const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')' |
The documentation for this class was generated from the following file:
- C:/xoops2511b2/htdocs/class/libraries/vendor/symfony/yaml/Inline.php