this is a class for corntab job, and the validation is very simple,
just check if the status of user is active when cron job runs, if not,
throws an exception, other developers won't want to overwrite this
which method of user class will be called is configurable via website
backed page(we write the name of methods directly in to  schedule
Using private methods will solve the problem but since we write public
methods for all the other cron classes, I just want to keep the style
to make less confusion.

On Tue, Apr 13, 2010 at 12:11 PM, Nathan Rixham <> wrote:
> Ryan Sun wrote:
>> I'm writing an abstract parent class which only contain a validate
>> method, other developers will extend this class and add many new
>> public methods, every new methods will need to perform a validate
>> first.  Won't it be good if validate get called automatically before
>> every method call so that they don't have to write more code and they
>> won't miss this validate?
> This may call for a back to roots approach, what exactly are you trying
> to accomplish, as in: what is the validation doing?
> perhaps if we see the full picture, we can recommend another perhaps
> more suited approach to the full thing, feel free to post the full code
> if you want / can, the more info the better!
> Regards,
> Nathan

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to