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!
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php