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.
@api
array $array PHP array:
integer $inline The level where you switch to inline YAML:
integer $indent The amount of spaces to use for indentation of nested nodes.:
Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise:
Boolean $objectSupport true if object support is enabled, false otherwise:
string A YAML string representing the original PHP array
public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false) {
$yaml = new Dumper();
$yaml
->setIndentation($indent);
return $yaml
->dump($array, $inline, 0, $exceptionOnInvalidType, $objectSupport);
}