/** * 类方法自动调用引导 * * 用于处理类外调用本类不存在的方法时的信息提示 * * @access public * * @param string $method 类方法名称 * @param array $args 所调用类方法的参数 * * @return mixed */ public function __call($method, $args) { switch ($method) { case 'encode': return call_user_func_array(array('Html', 'encode'), $args); case 'noCache': return Response::noCache(); case 'charset': return call_user_func_array(array('Response', 'charset'), $args); case 'expires': return call_user_func_array(array('Response', 'expires'), $args); case 'env': return call_user_func_array(array('Request', 'env'), $args); case 'server': return call_user_func_array(array('Request', 'server'), $args); case 'files': return call_user_func_array(array('Request', 'files'), $args); default: $this->halt('The method: ' . $method . '() is not found in ' . get_class($this) . ' class!', 'Normal'); } }