On 15/01/2011 12:44, Felix E. Klee wrote:
On Sat, Jan 15, 2011 at 11:40 AM, Gareth McCumskey
<gmccums...@gmail.com> wrote:
I am assumi9ng you are using symfony 1.x.
Yes.
If so, then its very simple. You can add any config file to symfony,
clear cache, then access those config settings using sfConfig::get.
Taking your use case, you could access it as:
sfConfig::get('webservices_whatever_config_i_want');
That's already working. I'm only wondering:
Where do I best load the config file?
Currently - see my original post - I do it at the top of each class file
where I want to read the configuration. But that doesn't feel right.
You do not need to do an include or require. Symfony autoloads config
files into its sfConfig object. All you need to do is place it in
root/lib if you want it availabel through the project or in
root/apps/frontend/lib if you want only in that application or lastly in
root/apps/frontend/modules/modulename/config for a specific module even.
--
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc
identi.ca: @garethmcc
--
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