thanks for all your reply, since all these classes have main entry in
cron.php, I have moved validation there.
Richard, your solution seems interesting, maybe I can use it later :)
On Thu, Apr 15, 2010 at 4:46 AM, Richard Quadling
rquadl...@googlemail.com wrote:
On 13 April 2010 17:25, Ryan Sun
On 13 April 2010 17:25, Ryan Sun ryansu...@gmail.com wrote:
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
validation.
which method of
Ryan Sun wrote:
As we all know, __call() can overload non-accessible methods,
eg.
Class User
{
public function __call($name, $args)
{
//validate user
$this-_validate();
$this-_{$name}($args);
}
private function _validate()
{
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
On Tue, 2010-04-13 at 12:03 -0400, 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
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
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
validation.
which method of user class will be called is configurable via website
backed
7 matches
Mail list logo