I have multiple inheritance like this one: http://stackoverflow.com/questions/356128/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?
+2
A:
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.
Ionuț G. Stan
2010-04-22 09:57:42
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.
Sam Dark
2010-04-23 12:36:13
+1
A:
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.
Sam Dark
2010-04-25 09:17:46
A:
there is no support for multiple inheritances at class level. This means you can't extend more than one class at a time. However multiple inheritance is supported in interfaces. An interface can extend an arbitrary number of other interfaces at a time.
Offshore PHP Outsourcing India
2010-05-26 09:00:34