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?
3
-
Is your question more related to PhpDoc or more related to "how displays the appropriate auto-completion inside the editor"?Savageman– Savageman2010-04-22 09:58:20 +00:00Commented Apr 22, 2010 at 9:58
-
1I don't like to call this trick multiple inheritance, but rather delegation.Ionuț G. Stan– Ionuț G. Stan2010-04-22 10:01:19 +00:00Commented Apr 22, 2010 at 10:01
-
Savageman, it's about PhpDoc but it's also good to know if there are IDE specific tricks.Sam Dark– Sam Dark2010-04-23 12:37:17 +00:00Commented Apr 23, 2010 at 12:37
Add a comment
|
3 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.
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.
1 Comment
Sam Dark
Thanks, I know I can use these but it's hard to redeclare all "inherited" methods and properties one by one. My hope is that there is some kind of PhpDoc I've missed that can delegate class methods and properties to another class. btw., PhpStorm supports both @property and @method.