Development

HowtoWriteYamlDynamically

You must first sign up to be able to contribute.

Version 1 (modified by spascoe, 12 years ago)
--

Symfony Howto: Write YAML Dynamiclly

Purpose

Sometimes it is necessary, and useful to update configuration scripts from within the Symfony application. While, it is simple to do, it may not be obvious to newcomers.

Code

$yaml = sfYaml::dump($your_array);
file_put_contents('path/file.yml', $yaml);

Usage