I am working on Zend Framework based application and one of the requirement is to create an management panel from where the super-users can dynamically update some of the system configs like change site's language so I am thinking of using db so save such details. Now I want to load these configs into the application and 开发者_运维技巧thinking of loading them in the bootstrap process. So is it possible to instantiate a Model in the bootstrapping and use it to load details from database into the application bootstrapping?
Have a look at the Zend_Config_Writer. The traditional database is not the best way (overkill) of storing config data. All the formats (ini, json, yaml, xml) that Zend_Config supports are serializable so they are easy to store, retrieve and manipulate. Read from and write to JSON for example.
精彩评论