开发者

How to load Zend Framework application details from database

开发者 https://www.devze.com 2023-04-06 02:36 出处:网络
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 si

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消