I have a problem with code completion on included files. It's common solution to include files in MVC frameworks, like this:
class.php:
<?php
class AModel
{
function showMe() { }
}
class AController
{
/**
* @return AModel
*/
function getModel()
{
return new AModel();
}
function showView()
{
include('view.html');
}
}
$x = new AController();
$x->showView();
?> |
view.html: (html is assigned as PHP5, changing name to view.php doesn't work either)
<?
/**
* @var AController
*/
$this;
// Code completion works here:
$myModel = $this->getModel();
// Unfortunately it doesn't follow:
// Failed to identify type of "$myModel" global variable.
$myModel->|
?> |
It properly recognizes $this and completes its methods, but for some reason, it does not do the same with $myModel. It is supposed to recognize it as AModel instance, as stated in @return for getModel() method. Of course both files are in the same project.
Please let me know if it's going to be fixed - it's very important feature to me
.