Symfony\Component\Yaml\Yaml::dump
Dumps a PHP array to a YAML string.
The dump method, when supplied with an array, will do its best to convert the array into friendly YAML.
Signature
public function dump(array
$array,
[integer
$inline = 2,
[integer
$indent = 4,
[Boolean
$exceptionOnInvalidType = false,
[Boolean
$objectSupport = false]]]] )
Parameters
$array
— array- PHP array
$inline
— integer- The level where you switch to inline YAML
$indent
— integer- The amount of spaces to use for indentation of nested nodes.
$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
- string
- A YAML string representing the original PHP array