Method Summary
-
string
dump($array, $inline)
Dump YAML from PHP array statically
-
echoln()
Wraps echo to automatically provide a newline.
-
array
load($input)
Load YAML into a PHP array statically
Method Details
-
(string) dump ($array, $inline)
Browse code
| $array |
PHP array |
| $inline |
The level where you switch to inline YAML |
Dump YAML from PHP array statically
The dump method, when supplied with an array, will do its best
to convert the array into friendly YAML.
-
Wraps echo to automatically provide a newline.
-
| $input |
Path of YAML file or string containing YAML |
Load YAML into a PHP array statically
The load 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:
$array = sfYaml::load('config.yml');
print_r($array);
|