PHP ZF Importing data into Zend_Config from database - magento style configurations
So I have a database开发者_运维技巧 table called configs that has the following columns - key and value.
The key looks like so 'core/database/params/username' and the value is 'root'. I want to be able to access this from a Zend_Config object using $config->core->database->params->username. Any ideas how to solve this?
Create your custom class My_Config_Database extending Zend_Config and implement any logic you want ;) Zend_Config_Ini is easy to understand and refactor for your needs ;)
精彩评论