简体   繁体   中英

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 use:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM