Re: Implementing optional methods in a concrete class, but calling them from an abstract class.

From: Date: Mon, 01 Nov 2010 17:42:41 +0000
Subject: Re: Implementing optional methods in a concrete class, but calling them from an abstract class.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-309211@lists.php.net to get a copy of this message
On Mon, Nov 1, 2010 at 11:13 AM, Richard Quadling <rquadling@gmail.com> wrote: > Hi. > > I have an abstract base class (call it genericServiceHandler). > > I have concrete classes (FaxService, EmailService). > > The genericServiceHandler is watching for commands from an external > source. The commands will always be one of a fixed set, no matter what > the concrete service is. They are Pause, Continue, Start, Stop, > Shutdown, PreShutdown. > > The genericServiceHandler has no need to process the commands. It only > receives them and maybe dispatches them to the concrete class. Right up to here, it sounded more like an interface than an abstract base class. > The concrete class doesn't have to implement handlers for all of the > commands, though, at a minimum, onStart() would be pretty much > essential. [snip] And then it didn't. :-/ Andrew

« previous php.general (#309211) next »