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?
Please sign in to leave a comment.
Answered on SO: http://stackoverflow.com/questions/43339820/phpstorm-does-not-support-yafs-init-method
In short:
https://phpdoc.org/docs/latest/references/phpdoc/tags/var.html