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