Dump PHP array to YAML
The dump method, when supplied with an array, will do its best to convert the array into valid YAML.
Options: `indent`: number of spaces to indent children (default 2) `wordwrap`: wordwrap column number (default 40)
string
dump
( $value, [integer $options = array()], array|Traversable $array)
-
array|Traversable
$array: PHP array or traversable object
-
integer
$options: Options for dumping
-
$value
Creates a literal block for dumping
string
_doLiteralBlock
(string $value, integer $indent)
-
string
$value
-
integer
$indent: The value of the indent.
Returns YAML from a key and a value
string
_dumpNode
(string $key, string $value, integer $indent)
-
string
$key: The name of the key
-
string
$value: The value of the item
-
integer
$indent: The indent of the current node
Folds a string of text, if necessary
string
_fold
($value $value, $indent)
-
$value
$value: The string you wish to fold
-
$indent
Attempts to convert a key / value array item to YAML
string
_yamlize
(string $key, string|array $value, integer $indent)
-
string
$key: The name of the key
-
string|array
$value: The value of the item
-
integer
$indent: The indent of the current node
Attempts to convert an array to YAML
string
_yamlizeArray
(array $array, integer $indent)
-
array
$array: The array you want to convert
-
integer
$indent: The indent of the current level