Try using the API of the sfDatabaseManager class
On Mar 16, 2010, at 10:11 PM, Dong YANG wrote:
> Hi everyone,
>
>
> I want to get some infos of the file 'config/databases.yml' from
> another file (action file for example). I tried the function sfConfig::get()
> but I failed to find the correct syntaxe, because there are only three prefix
> for getting config file by default (app_, sf_ and mod_).
>
> I tried to use the method sfYaml::load like in my file:
>
> $databaseConf = sfYaml::load(sfConfig::get('sf_config_dir') .
> '/databases.yml');
> $userName = $databaseConf ['all']['propel']['param']['username';
>
> But I think that this way is not proper, is that anybody has more
> proper way to read the config file?
>
> Any suggestion is welcome.
>
> Regards,
>
> JoJo
>
>
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en