Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 685
Pascal Klein Avatar asked Feb 25 '23 15:02

Pascal Klein


1 Answers

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

Or: type vdoc and press tab.

like image 180
Maerlyn Avatar answered Mar 10 '23 10:03

Maerlyn