2009年8月26日星期三

[fw-mvc] Zend_Application_Resource_Db resource plugin for initialize a Zend_Db adapter from Bootstrap

I try to use Zend_Application_Resource_Db resource plugin for initialize a Zend_Db adapter from Bootstrap and I add following codes for application.ini as documentation says.

[production]
resources.db.adapter = "pdo_mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "my_db"
resources.db.isDefaultTableAdapter = true

If I want to write _initDb() method to set database adapter for application from Bootstrap class how it would be ?

没有评论: