Development

HowtoWriteYamlDynamically

You must first sign up to be able to contribute.

Version 2 (modified by anonymous, 12 years ago)
--

Symfony Howto: Write YAML Dynamically

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