Netbeans PHP Code completion failing me, or am I failing it?

心已入冬 提交于 2020-01-06 07:44:07

问题


First off here is some information, I am using Netbeans 7.0 with the project's php interpreter set to 5.3. The reason for this is I am working with namespaces.

So the setup is thus, I have 3 folders

-app                    Namespace App
--controller
--model
--view
---*login.php
-system                 Namespace Sleek
-vendor                 Namespace Vendor
--*Reform.php

I am using Autoloading, however the entire project is, and this is the first instance I've run into where code completion didn't work, I find it curious...

Reform.php

namespace Vendor;
abstract class Reform {
    static function HtmlEncode($str);
}

is being called in...

login.php

(snip)
    <input id="url" name="url" type="hidden" value="<?php if (isset($_GET['r'])) { echo \Vendor\Reform::HtmlEncode($_GET['r']); } else { echo "/"; }; ?>">
(snip)

Ignore the horrible view setup with logic inside it please and help me understand why when I type \Vendor\Reform:: netbeans has no suggestions for me, yet it compiles and runs under E_STRICT


回答1:


It was a bug in netbeans PHP code completion

http://netbeans.org/bugzilla/show_bug.cgi?id=206521



来源:https://stackoverflow.com/questions/8705125/netbeans-php-code-completion-failing-me-or-am-i-failing-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!