在其他類中,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