开发者

PHP: How to tell Eclipse/Netbeans that an object is of a certain class, to enable Intellisense

I use Kohana 3.x as my Webapplication-Framework (which uses the MVC pattern) and use Propel as my ORM. Within my Controller I create an object that represents the profile that owns the current session:

$this->currentProfile = ProfileQuery::create()->findPK($profileId);

I pass the object to the views, that I u开发者_运维技巧se:

View::set_global('myProfile', $this->currentProfile); // c

Now I can use the object "myProfile" within my Views. But the problem is, that within this views, neither Netbeans nor Eclipse know the class of the object. So I cant use Intellisense anymore (which was one of the key-features for using Propel in the first place). So please help me: How can I tell Eclipse and/or Netbeans of which class my object "myProfile" is?


Netbeans solution: put this at the beginning of your template: /* @var $myProfile Profile */

Or: type vdoc and press tab.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜