Class Inline
Inline implements a YAML parser/dumper for the YAML inline syntax.
Methods summary
public static
mixed
|
#
parse( string $value, boolean $exceptionOnInvalidType = false, boolean $objectSupport = false, boolean $objectForMap = false, array $references = array() )
Converts a YAML string to a PHP value.
Converts a YAML string to a PHP value.
Parameters
- $value
string - $value A YAML string
- $exceptionOnInvalidType
boolean - $exceptionOnInvalidType true if an exception must be thrown on invalid types (a
PHP resource or object), false otherwise
- $objectSupport
boolean - $objectSupport true if object support is enabled, false otherwise
- $objectForMap
boolean - $objectForMap true if maps should return a stdClass instead of array()
- $references
array - $references Mapping of variable names to values
Returns
mixed - A PHP value
Throws
|
public static
string
|
#
dump( mixed $value, boolean $exceptionOnInvalidType = false, boolean $objectSupport = false )
Dumps a given PHP variable to a YAML string.
Dumps a given PHP variable to a YAML string.
Parameters
- $value
mixed - $value The PHP variable to convert
- $exceptionOnInvalidType
boolean - $exceptionOnInvalidType true if an exception must be thrown on invalid types (a
PHP resource or object), false otherwise
- $objectSupport
boolean - $objectSupport true if object support is enabled, false otherwise
Returns
string - The YAML string representing the PHP value
Throws
|
Magic methods summary
Constants summary
string |
REGEX_QUOTED_STRING
|
'(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')' |
|