Bryan
Bryan

Reputation: 645

How to load Zend Framework application details from database

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?

Upvotes: 1

Views: 122

Answers (1)

markus
markus

Reputation: 40675

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.

Upvotes: 2

Related Questions