获取对Zend_Application的配置对象的引用

是否有辅助方法/对象/方法来获取对
Zend_Application
的配置资源的引用? 我知道我可以做点什么
$config = new Zend_Config_Ini($file, $environment);
但那将重新加载/解析配置文件。我正在寻找一种方法来查看正在运行的
Zend_Application
的给定配置值。 我想要解决的更大问题是我想要一个
Zend_Queue
使用与我的默认数据库资源相同的数据库设置。如果除了“参考配置,读取资源值”之外还有更多“Zend Like”实现此方法的方式,请随时分享!     
已邀请:
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    public function run()
    {
        // make the config available to everyone
        $config = $this->getOptions();
        Zend_Registry::set('config', new Zend_Config($config));
        parent::run();
    }
}
Zend_Queue 在
Zend_Queue_Adapter_Db
__constructѭ6中有代码所以你可以做这样的事情
new Zend_Queue_Adapter_Db(array('dbAdapter' => Zend_Db_Table::getDefaultAdapter()));
因为标准
Zend_Application_Resource_Db
可以使用配置选项
resources.db.isDefaultTableAdapter = true
或者你可以将db adapter放在注册表中,并从任何地方从那里获取它     
Zend_Controller_Front::getInstance()->getParam('bootstrap')->getOptions()
    

要回复问题请先登录注册