예제 #1
0
 /**
  * _dispatchRequest
  * 发起接口请求
  * @param  string $name      接口名
  * @param  array $arguments 接口参数
  * @return
  */
 protected function _dispatchRequest($name, $arguments)
 {
     $action = ucfirst($name);
     $params = array();
     if (is_array($arguments) && !empty($arguments)) {
         $params = (array) $arguments[0];
     }
     $params['Action'] = $action;
     if (!isset($params['Region'])) {
         $params['Region'] = $this->_defaultRegion;
     }
     require_once QCLOUDAPI_ROOT_PATH . '/Common/Request.php';
     $response = QcloudApi_Common_Request::send($params, $this->_secretId, $this->_secretKey, $this->_requestMethod, $this->_serverHost, $this->_serverUri);
     return $response;
 }