Richard Quadling wrote:
Hi.
I have an abstract base class (call it genericServiceHandler).
I have concrete classes (FaxService, EmailService).
...
What would you all do?
If you've got fixed logic then just add all the onStart onPause and
similar methods to the abstract class, stub them to accept the correct
params but simply return immediately, call them in the correct places
with $this->onStart($arg0...)
Then any class which extends it, like EmailService, can simply overwrite
which ever methods it needs to implement.
The other approach which can be nice is to decouple it and go for an
event or message based system, that way you can hook in multiple
different callbacks to "do something" when the onSomething
[event/message] is dispatched.
Best,
Nathan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php