Reply to Re: Using a Resource as a Class Property

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация