multiple inheritance

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rupo
Forum Commoner
Posts: 25
Joined: Thu Jul 05, 2007 11:22 am

multiple inheritance

Post by Rupo »

Hallo,

AFAIK php does not support multiple inheritance. I've to add plugin to a wikimedia system, which impelments a gui-based Wizard.

The wizard contains a abstract class wizardBase and f.i. a extented class addNewsWizard. To implement this in a wikisystem as a specialpage the addNewsWizard class is also a extented class of specialpages.

So i tried it as following, but wizard base is no interface

Code: Select all

abstract class wizardBase {
....
}
class SpecialPages {
.....
}
class AddNewWizard extends SpecialPages implements wizardBase {
...
}
I hope some one can give me some useful advices

greetz
rup
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

There's no multiple inheritance in PHP. Change your design.
Post Reply