What I want to do is quite simple: store data in a custom config file that I want to read later on.
I created my file something.yml
that I put in the global
It's really easy, but also a little bit hacky:
Create the file /config/config_handlers.yml
and add this:
config/something.yml:
class: sfDefineEnvironmentConfigHandler
param:
prefix: something_
Then add these two lines to /web/index.php
after ... getApplicationConfiguration()
(and also add them to frontend_dev.php and wherever you want this config file to be available):
$configCache = new sfConfigCache($configuration);
include($configCache->checkConfig('config/something.yml'));
So your /web/index.php
might look like this afterwards:
checkConfig('config/something.yml');
sfContext::createInstance($configuration)->dispatch();
Btw: This is also in the documentation you cited, although the checkConfig() call is in a different place. Look for this: "When you need the code based on the map.yml file and generated by the myMapConfigHandler handler in your application, call the following line:"
Have fun ;-)