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);
>> eval("$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?
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.
-aaron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]