You are here: Re: Accessing Class Method « PHP Programming Language « IT news, forums, messages
Re: Accessing Class Method

Posted by Michael Fesser on 09/17/07 22:21

..oO(NoDude)

>By all all means, use
>require_once, it's a language statement, it's useful when you need to
>use it, BUT a thought out OOP should _not_ need the *_once statements.
>The flow of an OOP using a robust design paradigm (like MVC for
>instance), should allow for full knowledge of which class gets
>included where

Consider two entirely independent classes A and B, both relying or
inheriting from another class C. Since both A and B should be usable
without each other, both have to take care of their own dependencies and
hence have to include class C (unless you use __autoload()).

No problem with require_once, but if you just use require and want to
use both classes in the same project, you'll run into trouble.

Micha

 

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

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