开发者

PHP ZF Importing data into Zend_Config from database - magento style configurations

开发者 https://www.devze.com 2023-03-11 23:59 出处:网络
So I have a database开发者_运维技巧 table called configs that has the following columns - key and value.

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 ;)

0

精彩评论

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

关注公众号