CodeIgniter Forums
Netbeans not picking up my model class comments - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Netbeans not picking up my model class comments (/showthread.php?tid=33079)



Netbeans not picking up my model class comments - El Forum - 08-14-2010

[eluser]Dave F[/eluser]
I have a the file "usermodel.php" in system/application/models. I comment it the following way.

Code:
<?php
/**
* User
*
* @package User
* @author <my_name>
*/

/**
* User User_Model Class
*
* @package        User
* @subpackage    UserModel
*/
class User_Model extends Model
{
    /**
    * Checks the existence of the email address in the database
    *
    * @access public
    * @param String $email_address
    * @return Boolean - TRUE on success and FALSE otherwise
    */
    function check_existence($email_address)
    {
      ...
    }
}
?&gt;

I load it in my controller but an autocomplete popup doesn't appear in Netbeans when I type the member function. How should I comment this class properly?


Netbeans not picking up my model class comments - El Forum - 08-14-2010

[eluser]noname11[/eluser]
piggysmile, you can add a property in your controller like this:

/**
* @property User_Model $user_model
*/
try it. good luck!


Netbeans not picking up my model class comments - El Forum - 08-14-2010

[eluser]Dave F[/eluser]
It works. Thanks.


Netbeans not picking up my model class comments - El Forum - 08-15-2010

[eluser]billmce[/eluser]
You don't have to do it on a controller by controller basis
This article http://masnun.com/blog/2010/06/16/codeigniter-code-completion-with-the-netbeans-ide-for-php/ explains how to make it apply to all controllers.