Re: parent constructor
| From: | Aaron Tuller | Date: | Wed, 07 Feb 2001 18:28:08 +0000 |
| Subject: | Re: parent constructor | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38590@lists.php.net to get a copy of this message | ||
At 12:13 PM +0100 2/7/01, Christian Reiniger wrote:
On Wednesday 07 February 2001 05:14, Aaron Tuller wrote: $parentClass = get_parent_class($this);so that way I can have a general purpose way of calling a parent constructor like "super()" or whatever. It seems silly to hardcode the name of my parent class into the code of the class besides in the "extends" part in the definition. that way if I change the hierarchy, I don't have to worry about changing the constructor, it just always points to the parent. sorry if that isn't clear. -aaroneval("$parentClass::$parentClass();"); still, I think I should be able to do what I wrote below.Um, you know the name of your parent class, so why do you use get_parent_class() at all?