When configure was reworked and config file format readers were added in 2.0, I made the stupid mistake of not including functionality to write configuration files. I'm hoping to fix that in 2.2. While I don't think its reasonable to modify the underlying interface as doing that will cause issues for people upgrading. Instead I think conditionally checking for a `dump` method on the attached reader objects. These also have bad names now, but I think that's something that will need to be solved in a future version. Changing the names now would be nice, but causes additional pain when upgrading.
So far I have things working, but wanted to double check the API I was considering.
Configure::dump($filename, $config = 'default');
Dumps all the data stored in Configure into $filename. The $config reader is used to serialize the data into the appropriate format. I wonder if Configure should be writing files, or simply returning the string version of the data, and let the end developer dump the configuration into a file/save to the database.
I have the changes in a branch, you can see the diffs at:
Let me know what you think.
-Mark