PhpStorm没有检测到php库命名空间

I'm using PhpStorm as current IDE.

The only issue I have with it is that it can't find my php-library.

I've installed this: PHP-JS.

And by install, i mean generated the php-js.so file which I've loaded via php5enmod php-js.

The library works:

// This is a valid namespace AND classname
$context = new JS\Context;
$result  = $context->evaluate("var x = 3; var y = 4; var z = x + y; ++z;");
// will output 8

For some (well, not that strange) reason, PhpStorm can't find the JS namespace and consequently no classes from that namespace.

Is there a way I can tell PhpStorm that I'm actually calling an existing method from a valid class from a valid namespace?

I've tried to make it work using docBlock tags but none seems to match what I need.

查看全部
duankeng2026
duankeng2026
2016/03/10 16:05
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复