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()
{
//....
}
private function _update($args)
{
//....
}
}
$user = new User();
$user->update() // will call _validate before _update automatically
BUT, if I want to make this update a public function, how can I call
the validate without call it inside update function explicitly?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php