Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documenting PHP multiple inheritance with PhpDoc

I have multiple inheritance like this one: Can I extend a class using more than 1 class in PHP? (let's not discuss this approach itself please) and want my IDE to know about inherited class methods and properties. Is there a way to do it with PhpDoc?

like image 882
Sam Dark Avatar asked Apr 22 '10 09:04

Sam Dark


2 Answers

It seems there is currently no way to do it easily. I've created a ticket at PhpStorm issue tracker. Maybe they will add support for this feature.

http://youtrack.jetbrains.net/issue/WI-1730

like image 111
Sam Dark Avatar answered Oct 31 '22 23:10

Sam Dark


The @method anotation should be used for classes implementing __call. On a related note, for __get, __set and __isset, the @property annotations should be used. The only thing I don't know for sure is whether Eclipse PDT supports these annotations. I know NetBeans does.

like image 44
Ionuț G. Stan Avatar answered Oct 31 '22 22:10

Ionuț G. Stan