config->service_name)) { throw new ConfigException("config service_name 必须设置", ExceptionCode::CONFIG_ERROR_WRONG_PARAM); } self::$service_name= $this->config->service_name; if (!$request instanceof CustomRequest) { throw new ConfigException("request 必须是 Yzh\Model\CustomerRequest 的子类", ExceptionCode::CONFIG_ERROR_WRONG_PARAM); } if (!$response instanceof CustomResponseData) { throw new ConfigException("response 必须是 Yzh\Model\CustomerResponseData 的子类", ExceptionCode::CONFIG_ERROR_WRONG_PARAM); } $method = strtoupper($method); $res = $this->send($method, $url, $request, "Yzh\\Model\\Custom\\CustomResponse", $option); if (!$res instanceof CustomResponse) { throw new RunTimeException("系统错误"); } $res->setCustomerData($response); return $res; } }