I'm trying to get NetBeans 6.8 code completion to work for this. It doesn't seem to do it by itself, but I'm wondering if there's some phpdoc magic or something that may help, since it seems pretty darn good at using that.
Take the following two classes:
class A {
public $B;
public function __construct() {
$this->B = new D();
}
public function C() {
echo "C";
}
}
class D {
public $E;
public function __construct() {
// Do stuff.
}
public function F() {
echo "F";
}
}
Now, let's say I do $A = new A();
and then start typing $A->B->
Assuming that both classes are defined in the same file, this works perfectly. I get code complete suggestions for the E variable and the F method.
However, if the classes are split up into A.php and D.php respectively, and included into another file (say, index.php), doing the same thing after including both files gives only No Suggestions.
Any ideas? Thanks in advance!