Is it possible to access controller from action helper?

class Zend_Controller_Action_Helper_UserLimit extends Zend_Controller_Action_Helper_Abstract
{
    public test()
    {
        $this->getController(); // get controller which initiated the helper
    }
}
有帮助吗?

解决方案

Yes, it is possible:

$controller = $this->getActionController();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top