com/Verify.php
/**
     * Get the params and rule info to Start verification;
     * @return bool
     */
Get the params and rule info to Start verification;
@return bool
Get the params and rule info to Start verification ; @return bool
public static function run():bool
    {
        foreach(self::$verify as $param => $roleStr){
            $datum = explode(' ',str_replace('|',' ',$roleStr));
            foreach ($datum as $key => $role){
                if(strpos($role,':') !== false){
                    $val = explode(' ',str_replace(':',' ',$role));
                    $func = $val[0];
                }else{
                    $func = $role;
                }
                if(strpos($func,'=') !== false){
                    $val = explode(' ',str_replace('=',' ',$role));
                    $func = $val[0];
                }
                if(!method_exists(__CLASS__,$func)){
                    self::$verifyRes = [
                        'code' => 404,
                        'func' => $func,
                        'msg'  => self::$errorArr['func']
                    ];
                    return true;
                }
                if(is_null(self::$link))  self::$link = pdo::connect();
                $data = ['key'=>$param,'rule'=>$val[1] ?? ''];
                if(forward_static_call([__CLASS__,$func],$data)) return true;
            }
        }
        return true;
    }
public static function run ( ) : bool { foreach ( self :: $ verify as $ param => $ roleStr ) { $ datum = explode ( ' ' , str_replace ( '|' , ' ' , $ roleStr ) ) ; foreach ( $ datum as $ key => $ role ) { if ( strpos ( $ role , ':' ) !== false ) { $ val = explode ( ' ' , str_replace ( ':' , ' ' , $ role ) ) ; $ func = $ val [ 0 ] ; } else { $ func = $ role ; } if ( strpos ( $ func , '=' ) !== false ) { $ val = explode ( ' ' , str_replace ( '=' , ' ' , $ role ) ) ; $ func = $ val [ 0 ] ; } if ( ! method_exists ( __CLASS__ , $ func ) ) { self :: $ verifyRes = [ 'code' => 404 , 'func' => $ func , 'msg' => self :: $ errorArr [ 'func' ] ] ; return true ; } if ( is_null ( self :: $ link ) ) self :: $ link = pdo :: connect ( ) ; $ data = [ 'key' => $ param , 'rule' => $ val [ 1 ] ?? '' ] ; if ( forward_static_call ( [ __CLASS__ , $ func ] , $ data ) ) return true ; } } return true ; }
Get the params and rule info to Start verification;
 @return bool
Get the params and rule info to Start verification ; @return bool
//Get the params and rule info; //Get the funcName and rule //Determine if the method exists //Check the mysql connect //Perform verification