class Yaml
Yaml offers convenience methods to load and dump YAML.
Methods
| static array |
parse(string $input)
Parses YAML into a PHP array. |
|
| static string |
dump(array $array, integer $inline = 2)
Dumps a PHP array to a YAML string. |
Details
at line 45
static public array
parse(string $input)
Parses YAML into a PHP array.
The parse method, when supplied with a YAML stream (string or file),
will do its best to convert YAML in a file into a PHP array.
Usage:
<code>
$array = Yaml::parse('config.yml');
print_r($array);
</code>
at line 96
static public string
dump(array $array, integer $inline = 2)
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.