I have a php project with several files in netbeans. Lets say in one fi开发者_运维百科le looks like this:
<?php
$foo = new Foo();
?>
When I type $foo->
in this file Netbeans suggests all the methods and properties.
When I start typing $foo->
in a different file Netbeans suggests that I mean $foo
, so fare so good.
But then Netbeans has forgotten about the type and doesn't suggest any methods.
Also /* @var $foo Foo */
does not help.
Is it possible to tell netbeans that $foo
is always a object of the Class Foo?
I don't believe there's a way to. You should file this as a bug: http://netbeans.org/community/issues.html
精彩评论