如何在 Controller Action 中获取资源? 资源数据库已在 application.ini 中初始化。
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// I want db resource here
}
}
最佳答案
试试看是否可行:
$this->getFrontController()->getParam('bootstrap')->getResource('db')
关于zend-framework - 如何在 Controller Action 中获取资源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2929725/