Special case for @var $this
I'm working with Yii framework and they implement templates inside controller class. So in templates I can access all controller data via $this.
How I can say to PhpStorm about it - that this current file included inside specific class?
Now i'm using phpDoc construction /** @var $this SomeController */
It's work well except access to protected members. So in this example
a.php:
<?
class A { protected $test; public function test() { include("b.php"); } }?>
b.php:
<?php /** @var A $this */ echo $this->test; ?>
I will get "member has protected access" warning. Is it possible to fix this warning?
Please sign in to leave a comment.
It makes sence. Please file this to project tracker.
Thanks, I did it.