How to load Zend Framework application details from database

122 Views Asked by At

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?

1

There are 1 best solutions below

0
markus On

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.