微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

php-Netbeans中的Yii框架-未出现对象方法自动完成

我刚刚注意到,对象方法自动完成功能不会列出要自动完成的方法列表.我在使用$PDO-> bindparam()方法时看到了它.通常,我可以在方法箭头之后开始输入“ bi”,并且自动完成功能将直接出现在该方法中.现在,这些方法没有出现,但是我个人定义的类中的方法属性将出现.另外,它说“找不到PHPDoc”.

很奇怪,因为它以前运行良好.我唯一能想到的是,我不得不从Netbeans中删除该项目,然后使用“来自现有资源的新项目”将其恢复.

我需要重新连接的文档文件链接是否断开?我将如何解决这个问题?另外,如果这是一个愚蠢的问题,我们深表歉意.

解决方法:

>代码完成

获取上下文相关的代码完成,请按照下列步骤操作:

Include Yii folder (assuming it is properly placed outside project directory)
    Open "File > Project properties > PHP Include Path" and add the Yii framework root path
Ignore yiilite.PHP to avoid doubled/missing documentation
    Open "Tools > Options > Miscellaneous > Files"
    Add to the front of "Files Ignored by the IDE" the file "^(yiilite\.PHP|CVS|SCCS|...."
    Restart NetBeans
Code completion in view files
    Add the following PHPDoc statement at the head of the file to use code completion in view files. (you may add additional passed parameters as well)

/* @var $this PostController */
/* @var $model Post */
$this->getSomeProvalue(); // possible with code completion
$model->author; // possible with code completion

用法

Typing suggestions: Ctrl-Space
Show Function parameters: Ctrl-P
Comment your own code with PHPDoc style. Here's a good example.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐