I am using Zend_Application, and it does not seem to me that I am mixing application.ini in my application with both the configuration of the application and the user.
What I mean is the following. For example, my application needs some library classes in the MyApp_ namespace. So in application.ini I put autoloaderNamespaces [] = "MyApp_". This is the pure configuration of the application, no one but the programmer will change them. On the other hand, I set up the database configuration there, which will change SysAdmin.
My idea is that I would split the parameters between application.ini and user.ini, where preferences are given preference in user.ini (so I can define standard values in application.ini).
Is that a good idea? How can I best implement this? I have an idea
- Zend_Application extension for loading multiple configuration files
- Executing the init function in my Bootstrap loading user.ini
- Parsing configuration files in my index.php and passing them to Zend_Application (sounds ugly)
What should I do? I would like to have the “cleanest” solution ready for the future (new versions of ZF and other developers working in the same application)
source
share