|
Posted by Chung Leong on 11/24/05 07:31
Angelos wrote:
> But although that's working... it doesn't seem to be really OO :p
>
> So can you tell me what I can do ?
Errrr, stop pretending that you have an OOP design? You're basically
programming procedurally with the use of classes. If your class methods
are regular regular functions, you wouldn't be having the problem
you're having now.
One of the tenets of OOP is encapsulation--codes deal with a different
concerns should be independent and self-contained. When you have one
class that does one thing (say validation) directly dependent on
another class, doing something quite unrelated (say logging), the
design is rubbish. For the situation you described, you would want some
kind of slot/socket mechanism. In a typical PHP script though, such
complexity is really an overkill.
Navigation:
[Reply to this message]
|