You are here: Re: Using a Resource as a Class Property « PHP Programming Language « IT news, forums, messages
Re: Using a Resource as a Class Property

Posted by Sanders Kaufman on 07/23/07 01:48

Michael Fesser wrote:
> .oO(Sanders Kaufman)

>> So, bottom line, what you're saying here is that when you extend a base
>> class like this, you still have to manually call the base class's
>> constructor? Zat right?
>
> Correct. PHP doesn't do that automatically, except if the child class
> doesn't have a constructor. Then PHP will call the one from the base
> class, if it exists. But as soon as your child class uses its own
> constructor, you have to manually call the parent one. Usually this
> should be the first action.

Got it - and I wish I'd got it a year ago!

Is that a normal OOP way to do it - done that way in C++ and whatnot -
or is this unique to PHP?

 

Navigation:

[Reply to this 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

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