W dniu 3 września 2010 17:42 użytkownik Michał Piotrowski <mkkp...@gmail.com> napisał: > Hi, > > I want to create a custom config file. I have read > http://stackoverflow.com/questions/2544553/how-to-create-a-custom-yaml-config-file-in-symfony > > Now I've got config/config_handlers.yml > config/client.yml: > class: sfDefineEnvironmentConfigHandler > param: > prefix: client_ > > config/client.yml > all: > test: "aaaa" > > But when I try to use sfConfig::get('client_test') it returns nothing. > > client.yml is cached in cache/frontend/dev/config/config_client.yml.php > <?php > // auto-generated by sfDefineEnvironmentConfigHandler > // date: 2010/09/03 17:31:35 > sfConfig::add(array( > 'client_test' => 'aaaa', > )); > > like any other config files. > > Also sfConfig::getAll doesn't return anything related to client_ prefix. > > Any ideas why it's not working in my case?
Nevermind, I noticed that I pasted code from bogus example $configCache = new sfConfigCache($configuration); $configCache->checkConfig('config/client.yml'); instead of $configCache = new sfConfigCache($configuration); include($configCache->checkConfig('config/client.yml')); to my web/frontend_dev.php Regards, Michal -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en