Reply to Re: PHP5 and Classes

Your name:

Reply:


Posted by Jerry Stuckle on 07/12/06 17:11

ybakos wrote:
> I don't quite get what you're trying to accomplish (but I'm not that
> bright).
>
> You should avoid deep inheritance heirarchies.
>
> Or perhaps you shouldn't override the methods in this manner, since you
> are trying to achieve the ability to 'reach back' up the inheritance
> chain to call the 'Grandparent' method.
>
> Not sure if this helps.
>
> Cheers,
> Yong
>
>
>
> Jeff North wrote:
>


Actually, Yong, I find "deep inheritance hierarchies" to be useful at
times. Of course they've been complicated - but each class only needs
to worry about its own implementation and the interface of its base
class. It all depends on what you need.

As for overriding the functions - that's one of the beauties of OO
programming. You call setSize() in the lowest class, and it processes
the request and passes it on to the parent. Of course, each setSize()
should have the same purpose - just each one performs whatever work is
needed on its own class.

P.S. Please don't top post. This group uses bottom posting as a
standard. Thanks.

--
==================
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

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