发送异步请求

@param string $method 指令
@param array $arguments 指令参数
@return $this
@throws Exception
979779
public function handle(string $method, array $arguments)
    {
        $upMethod = strtoupper($method);
        $context  = array_shift($arguments);

        if (in_array($upMethod, self::$asynCommand)) {
            $sql = '';
            if ($upMethod == 'GO') {
                if (!empty($arguments[1])) {
                    $sql = trim($arguments[1]);
                } else {
                    $sql = $this->getDBQueryBuilder($context)->getStatement(false);
                }
            }

            if (!empty($sql) && empty($arguments[0]) && !empty($this->slaves)) {
                if (stripos($sql, 'SELECT') === 0 || stripos($sql, 'SHOW') === 0) {
                    $rand     = array_rand($this->slaves);
                    $poolName = $this->slaves[$rand];
                } else {
                    $poolName = $this->master;
                }
            } else {
                $poolName = $this->master;
            }

            $pool = getInstance()->getAsynPool($poolName);
            if ($pool == null) {
                throw new Exception("mysql pool $poolName not register!");
            }
            $this->getDBQueryBuilder($context)->mysqlPool = $pool;
            if (method_exists($this->getDBQueryBuilder(), $method)) {
                return $this->getDBQueryBuilder($context)->{$method}(...$arguments);
            } else {
                array_push($arguments, $context);
                return $this->getDBQueryBuilder($context)->mysqlPool->{$method}(...$arguments);
            }
        }

        $this->getDBQueryBuilder($context)->{$method}(...$arguments);

        return $this->__wrapper;
    }
719679
public function popsCall($method, array &$arguments)
    {
        if ($this->liberatorReflector->hasMethod($method)) {
            $method = $this->liberatorReflector->getMethod($method);
            $method->setAccessible(true);

            return $this->popsProxySubValue(
                $method->invokeArgs($this->popsValue(), $arguments)
            );
        }

        return parent::popsCall($method, $arguments);
    }
1141061
protected function tryMethod($method, array $arguments = array())
    {
        try {
            call_user_func_array(array($this, $method), $arguments);

            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
250275
protected function invockeAction($method, $arguments)
    {
        try {
            $result = call_user_func_array([$this, $method], $arguments);
        } catch (\Exception $e) {
            $result = $this->createResponse(
                sprintf('%s::%s - %s:%s', get_class($this), $method, get_class($e), $e->getMessage()),
                500
            );
        }
        return $result;
    }
1270570
private function executeMethod($method, $args = [])
    {
        if (method_exists($this, $method)) {
            return call_user_func_array([$this, $method], $args);
        }
    }
945961
public function setMethod($method)
	{
		if ($method === null || !is_array($method) || empty($method)) {
			throw new InvalidArgumentException('No method provided');
		}

		foreach ($method as $m) {
			if (!in_array($m, array('GET','POST','PUT','PATCH','DELETE'))) {
				throw new InvalidArgumentException('Method not allowed. allowed methods: GET, POST, PUT, PATCH, DELETE');
			}
		}

		$this->method = $method;

		return $this;
	}
652182
public function method($method)
    {
        if (!$this->isString($method) && !$this->isStringObject($method)) {
            throw new EventManagerException(EventManagerException::MSG_INVALID_ARG, [
                    '$method',
                    'string|StringObject'
                ]
            );
        }
        $this->method = StdObjectWrapper::toString($method);

        return $this;
    }
490567
private function extract(iterable $extractors, string $method, array $arguments)
    {
        foreach ($extractors as $extractor) {
            if (null !== $value = $extractor->{$method}(...$arguments)) {
                return $value;
            }
        }
    }
968316
public function setMethod($method = self::GET)
	{
		if (in_array($method, $this->allowedMethods)) {
			$this->method = $method;
		} else {
			throw new RuntimeException('Invalid method setted.');
		}
		
		return $this;
	}
578781
public function setMethod($method) {
        if (!is_string($method))                 throw new IllegalTypeException('Illegal type of parameter $method: '.gettype($method));
        if ($method!=='GET' && $method!=='POST') throw new InvalidArgumentException('Invalid argument $method: '.$method);

        $this->method = $method;
        return $this;
    }
147465
public function setMethod($method)
    {
        $method = strtoupper($method);

        if (!defined('static::'.$method)) {
            throw new InvalidArgumentException('Invalid HTTP method passed');
        }

        $this->_method = $method;
        return $this;
    }
1176707
public function setMethod($method)
    {
        // Validate method is string
        if (is_string($method) === false) {
            throw new InvalidArgumentException(
                'Parameter "method" is not a string'
            );
        }

        // Valid method is not blank
        if ($method === '') {
            throw new InvalidArgumentException(
                'Parameter "method" cannot be blank'
            );
        }

        $this->method = $method;

        return $this;
    }
288002
public function query($id, $method, array $arguments = null)
    {
        $this->client->query($id, $method, $arguments);

        return $this;
    }
393898
public function notify($method, array $arguments = null)
    {
        $this->client->notify($method, $arguments);

        return $this;
    }
26307
protected function invokeMethod($object, $method, array $arguments = array())
    {
        return $this->getReflectionMethod($object, $method)->invokeArgs($object, $arguments);
    }
1064790
public static function make(array $arguments = [])
    {
        $class = static::getFacadeAccessor();

        try {
            $reflection = new \ReflectionClass(static::getFacadeAccessor());
            $parameters = $reflection->getConstructor()->getParameters();
        } catch (\Throwable $error) {
            throw new \Exception('Wrong parameter', 0, $error);
        }

        return new $class(...static::composeMakeParameters($parameters, $arguments));
    }
1136062
public function tryCall($method, $arguments)
    {
        if (isset($this->_hookTrait) && $ret = $this->hook('method-'.$method, $arguments)) {
            return $ret;
        }

        if (isset($this->_appScopeTrait) && isset($this->app->_hookTrait)) {
            array_unshift($arguments, $this);
            if ($ret = $this->app->hook('global-method-'.$method, $arguments)) {
                return $ret;
            }
        }
    }