Posted by Joe Scylla on 01/25/08 14:04
wozozo wrote:
> hello.
>
> i'm using PDT. But, complement does not work well.
> Please see the following codes.
>
> --------------------------------------------------------------------
>
> class A {
> public $a;
> public function __construct() {
> $this->a = new B();
> }
> }
>
> class B {
> public $b;
>
> public function funcB() {
> echo 'classB';
> }
> }
>
> $obj = new A();
> $obj->a->
>
> --------------------------------------------------------------------
>
> after this I want to complement "" funcB() "" .
> But It is not complemented even if it pushes Ctrl+Space.
>
> " $obj->a" is complemented.
> Can't this complement be performed in PDT?
Yes, but only if you document your sourcecode with PHPDocumentor-Tags:
To get smarthelp for the property of your Class A you have to add
following documentation tags:
<code>
class A {
/**
* Type of class B
*
* @var B
*/
public $a;
public function __construct() {
$this->a = new B();
}
}
</code>
More infos at: http://www.phpdoc.org/
Joe
[Back to original message]
|