|
Posted by Jerry Stuckle on 07/23/07 12:16
Sanders Kaufman wrote:
> Michael Fesser wrote:
>
>> Quite simple: A base class with a member variable and a method that
>> performs some action with that. Since this is done in the constructor,
>> every child class has to be able to initialize the data before calling
>> the parent constructor, as you can see in B::__construct(). If PHP would
>> automatically call the parent constructor, this would be impossible.
>
> So extended (child?) classes MUST NOT (for OOP reasons) automatically
> call a constructor. Rather, it should be called manually, if and when
> it's desired.
Incorrect in OO theory, but used in some applications.
>
> And this is not unique to PHP.
>
True, there are some other implementations which implement part of the
OO world, but not all.
> Zat right?
>
> (Scuse me if I'm being dense, but I got some head stuff going on.)
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|