在其他类中,PhpStorm可以识别__construct()
函数,但是在yaf控制器中它不能识别初始化方法init()
,导致init()
无法跟踪初始化操作。PhpStorm不支持yaf的init方法
class TestController extends Yaf_Controller_Abstract{
private $model;
public function init() {
$this->model = new TestModel();
}
public function test(){
$this->model->testDeclaration();
}
}
class TestModel{
public function testDeclaration(){
}
}
在这个例子中,我想在TestModel
类使用“go to declaration
”自测试功能$this->model->testDeclaration();
到testDeclaration()
功能。但它不起作用。
PhpStorm告诉我:
找不到声明去
如何使用 '去申报' 正确吗?
非常感谢你,这样可以 –
@张轩铭是否能解决您的问题,即考虑将其标记这个答案所接受。 – LazyOne