jordanwb Posted May 23, 2008 Share Posted May 23, 2008 I have the following classes: abstract class DatabaseEngine { function DatabaseEngine ($settings){} } class MySQLDatabaseEngine extends DatabaseEngine { function MySQLDatabaseEngine ($settings){} } How do I call the parent class' constructor? For Java I call super () and for C# I call base (). I know I use the parent keywork but I don't know how and where I would use it. Thanks. Link to comment https://forums.phpfreaks.com/topic/106949-how-to-call-parent-class-consturctor/ Share on other sites More sharing options...
roopurt18 Posted May 23, 2008 Share Posted May 23, 2008 Example 1 has it. http://us3.php.net/manual/en/language.oop5.decon.php Link to comment https://forums.phpfreaks.com/topic/106949-how-to-call-parent-class-consturctor/#findComment-548175 Share on other sites More sharing options...
jordanwb Posted May 23, 2008 Author Share Posted May 23, 2008 Thanks. Link to comment https://forums.phpfreaks.com/topic/106949-how-to-call-parent-class-consturctor/#findComment-548177 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.