Symfony\Component\Yaml\Parser::parse
Parses a YAML string to a PHP value.
Signature
public function parse(string
$value,
[Boolean
$exceptionOnInvalidType = false,
[Boolean
$objectSupport = false]] )
Parameters
$value
—
string
- A YAML string
$exceptionOnInvalidType
—
object
- true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
$objectSupport
—
object
- true if object support is enabled, false otherwise
Returns
- mixed
- A PHP value
Errors/Exceptions
-
ParseException
- If the YAML is not valid