Class Parser
Parser parses YAML strings to convert them to PHP arrays.
Methods summary
public
|
#
__construct( integer $offset = 0 )
Constructor
Parameters
- $offset
integer $offset The offset of YAML document (used for line numbers in error messages)
|
public
mixed
|
#
parse( string $value, Boolean $exceptionOnInvalidType = false, Boolean $objectSupport = false )
Parses a YAML string to a PHP value.
Parses 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
Returns
mixed A PHP value
Throws
|