CLASS_NOTIFY::notify_input PHP Method

notify_input() public method

读取 app 信息 app_get function.
public notify_input ( $str_method = "get", boolean $chk_token = false ) : void
$chk_token boolean (default: false)
return void
    function notify_input($str_method = "get", $chk_token = false)
    {
        switch ($str_method) {
            case "post":
                $_str_time = fn_post("time");
                $_str_signature = fn_post("signature");
                $_str_code = fn_post("code");
                $this->jsonp_callback = fn_post("callback");
                $_arr_notifyInput["act_post"] = fn_post("act_post");
                break;
            default:
                $_str_time = fn_get("time");
                $_str_signature = fn_get("signature");
                $_str_code = fn_get("code");
                $this->jsonp_callback = fn_get("callback");
                $_arr_notifyInput["act_get"] = fn_get("act_get");
                break;
        }
        $_arr_time = validateStr($_str_time, 1, 0);
        switch ($_arr_time["status"]) {
            case "too_short":
                return array("alert" => "x220201");
                break;
            case "ok":
                $_arr_notifyInput["time"] = $_arr_time["str"];
                break;
        }
        $_arr_signature = validateStr($_str_signature, 1, 0);
        switch ($_arr_signature["status"]) {
            case "too_short":
                return array("alert" => "x220203");
                break;
            case "ok":
                $_arr_notifyInput["signature"] = $_arr_signature["str"];
                break;
        }
        $_arr_code = validateStr($_str_code, 1, 0);
        switch ($_arr_code["status"]) {
            case "too_short":
                return array("alert" => "x220204");
                break;
            case "ok":
                $_arr_notifyInput["code"] = $_arr_code["str"];
                break;
        }
        $_arr_notifyInput["alert"] = "ok";
        return $_arr_notifyInput;
    }