Code.class.php 2.29 KB
<?php
/**
 * 常规的请求对应的code及解释
 * @author xmg
 * @version 0.1 2013.1.4
 *
 */
class Config_Code
{
   /**
    * 500 系统错误
    *
    * @var array
    */
    public static $error_system = array
    (
       'code' => 500 ,
       'message' => '系统错误',
    );
   
    /**
     * 未登录或权限未通过
     *
     * @var array
     */
    public static $error_auth = array
    (
    	'code' => 401 ,
    	'message' => '你尚未登录或登录已过期,请重新登录',
    );
   
    /**
     * 缺少参数
     *
     * @var array
     */
    public static $error_missing_parame = array
    (
    	'code' => 402 ,
    	'message' => '缺少参数',
    );
       
    /**
     * 无效的请求
     *
     * @var array
     */
    public static $error_invalid_request = array
    (
    	'code' => 403 ,
    	'message' => '无效的请求',
    );
    
    /**
     * 网页不存在 
     *
     * @var array
     */
    public static $error_page_not_found = array
    (
    	'code' => 404 ,
    	'message' => '该网页不存在',
    );
    
    /**
     * 验证码错误 
     *
     * @var array
     */
    public static $error_verification_code = array
    (
    	'code' => 405 ,
    	'message' => '诶呀,输错了',
    );
    
    /**
     * 手机校验码错误 
     *
     * @var array
     */
    public static $error_verification_mobilecode = array
    (
    	'code' => 406 ,
    	'message' => '诶呀,输错了',
    );

    /**
     * 网页过期
     *
     * @var array
     */
    public static $error_request_expired = array
    (
    	'code' => 407 ,
    	'message' => '该请求已过期,你尝试刷新页面或重新操作',
    );
    
    /**
     * 手机校验码错误 
     *
     * @var array
     */
    public static $error_not_allow = array
    (
    	'code' => 408 ,
    	'message' => '你无权操作',
    );
   
    /**
    * 200 成功请求
    *
    * @var array
    */
   public static $sucess = array
   (
       'code' => 200 ,
       'message' => '成功请求',
   );
   
   public static $sucess_send_mobile_code = array
   (
       'code' => 201 ,
       'message' => '已成功发送手机校验码',
   );   
   
   public static $sucess_send_email_code = array
   (
       'code' => 201 ,
       'message' => '邮箱校验已成功发送',
   );   
}