我需要在其他一些公共方法之前运行一个私有方法,所以我使用__call
了似乎覆盖默认方法调用的方法,所以它看起来像这样
function __call($method, $arguments)
{
// echo($method);
if (in_array($method, array('changeStatus', 'lockStatus')))
$this->_checkInputData($arguments);
call_user_func($method, $arguments);
}
但是我突然注意到该__call
方法仅适用于未定义的方法,那么有没有办法在指定之前调用自定义方法?