PHPDoc用于对象的属性

Is is possible (for type hinting purposes) to indicate the class of an object's property? The final product of the code works as expected, but, type hinting does not. For example, the following shows what I am trying to accomplish but that does not work:

    /* @var $this->view \app\components\View */
    $this->view->title = 'Title here';

All I have ever seen were references to @var $this or similar, but never a property of the $this object. If this is possible, what am I missing?

Yes - you must apply the PHPDoc annotation where you declare the property in the class:

class Foo
{
    /* @var \app\components\View $view*/
    public $view;

    public function __construct()
    {
          $this->view->title = 'Title here';
    }
}