I can't seem to get a class to refer to itself in PHP. If I declare a class, I want it to be able to act upon itself. Ultimately, I want a premise class defined as the foundation of future classes which extend/connect to it by whatever means. So, if I'm extending from it, I want the child class to be able to have its own constructor that doesn't override the constructor of the parent class.
Is there any way to do this? Thanks!
You can call the parent construct of a parent class with:
parent::Constructor().
Are you wanting something not explained(The 'User Contributed Notes' as well) in:
[url]http://php.net/manual/en/keyword.extends.php[/url]
[url]http://php.net/manual/en/language.oop5.inheritance.php[/url]
If not could you explain a little better what your wanting to do.
Sorry, you need to Log In to post a reply to this thread.