Netbeans code completion

Hi,

I’ve followed the instructions for netbeans code completion, and I now get all the basic Yii methods etc, however, I seem to be missing some, such as Yii::app()->user does not appear, although if I add it, and run the project, everything works as expected.

I’m a bit new to Yii, so any help would be much appreciated :)

Owen

This also applies to JetBrains PhpStorm (WebIDE). One of the solutions is, for example in YiiBase.php on line 68 write something like


/** @var CApplication */

private static $_app;

and then in CApplication.php add to class definition


/** @var CWebUser */

public $user;

This simple comments will enable IDE’s ability to autocomplete and other functions related to variables’ type.

For example


Yii::app()->user->setFlash('contact', 'Thanx <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/wink.gif' class='bbc_emoticon' alt=';)' />');

will not be unregonizable by IDE any more.

I hope devs will add it sometime, because I have seen this comments in sources already, but not everywhere. It would be great if, at least, all most common variables will be properly commented.