Phpstorm does not support yaf's init method

Answered

In other class, Phpstorm can identify __construct function, but in yaf controller, Phpstorm can not identify the initialization method init, resulting in the init can not trace initialization operation

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(){
    }
}

In this example, I want use 'go to declaration' from test function $this->model->testDeclaration(); to testDeclaration() function in TestModel class. But it does not work. PhpStorm tells me:

Cannot find declaration to go to

How can I use 'go to declaration' correctly here?

0

Please sign in to leave a comment.