我有以下类层次结构和函数
abstract class Client_Controller_Abstract extends Zend_Controller_Action
abstract class Client_Tool_Controller_Abstract extends Client_Controller_Abstract
class Module_controller extends Client_Tool_Controller_Abstract
{
public function util()
{
}
public function sampleAction()
{
$this->util();
}
}
我想将函数util移动到Client_Tool_Controller_Abstract,所以我可以在其他控制器中共享它。但是,当我这样做时,我得到:
Method "util" does not exist and was not trapped in __call()
这是Zend Framework 1.12