Jump to content

How to call parent class' consturctor


jordanwb

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.