开发者

Netbeans php Model functions autohint

开发者 https://www.devze.com 2023-03-08 00:46 出处:网络
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 autohi

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;
0

精彩评论

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

关注公众号