-
(string) dump ($array, $inline)
Browse code
| $array |
PHP array |
| $inline |
The level where you switch to inline YAML |
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.
returns A YAML string representing the original PHP array
-
| $string |
The string to echo with new line |
Wraps echo to automatically provide a newline.
-
(string) getSpecVersion ()
Browse code
Gets the YAML specification version to use.
returns The YAML specification version
-
| $input |
Path of YAML file or string containing YAML |
Loads YAML into a PHP array.
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);
returns The YAML converted to a PHP array
throws InvalidArgumentException If the YAML is not valid
-
setSpecVersion ($version)
Browse code
| $version |
The YAML specification version |
Sets the YAML specification version to use.