Netbeans php Model functions autohint
Netbeans isn't reading the phpDoc / autohinting for any functions I have in my Models folder when I'm in a controller that loads said model. So if i'm in the controller ajax.php I don't get autohinting/completeing for $this->notification->...
even though I have loaded the model notification.php.. I even have @property CI_Model $notification at the top of the page in a comment/phpDoc. Any ad开发者_运维知识库vice?
I would suggest you to take a look at this post: CodeIgniter Code Completion with the Netbeans IDE for PHP
After that, I add my models to ci_autocomplete.php as this:
@property Products_Model $Products_Model
I have this setup currently working on NetBeans IDE 6.8 (Windows)
Good luck and happy coding!
The correct docblock for class properties is
class ClassName
{
/**
* @var type
*/
(public|private|protected) $propertyName;
So in your case, something like
class MyController
{
/**
* @var CI_Model
*/
private $notification;
精彩评论