Calls the REST API Method
@param string $methodName
@param array $params
@return array
@throws Exception
483402
public function call($methodName, array $params = array())
    {
        $options = array_merge($this->defaultApiOptions, $this->createConfigByMethodName($methodName));
        if (in_array($methodName, $this->postMethodNames)) {
            if (!($methodName == 'account/settings' && empty($params))) {
                $options['http'] = 'post';
            }
        }
        return $this->internalCall($methodName, $options, $params);
    }
553986
private function getCall(string $methodName): DICallWrapper
    {
        if (array_key_exists($this::CALLS_SECTION, $this->serviceArray)) {
            foreach ($this->serviceArray[$this::CALLS_SECTION] as $callArray) {
                $call = new DICallWrapper($callArray);
                if ($call->getMethodName() === $methodName) {
                    return $call;
                }
            }
        }
        throw new MissingUpdateCallException();
    }
331861
public function call(callable $callable, ...$params)
    {
        foreach ($this->settings as $key => $value) {
            $this->ini->set($key, $value);
        }

        $result = null;
        $exception = null;
        try {
            $result = $callable(...$params);
        } catch (\Throwable $e) {
            $exception = $e;
        }

        $this->ini->cleanup();

        if ($exception) {
            throw $exception;
        }

        return $result;
    }
197139
public function classCall($plugName, array $params = array())
    {
        $class  = self::toCamelCase($plugName);
        $plugin = $this->getObjectPlugin($class);

        return call_user_func_array(array($plugin, 'process'), $params);
    }
100547
private function sendResponse(array $methodCalls, $respObj)
    {
        foreach ($methodCalls as $call) {
            list($method, $args) = $call;
            $respObj = $respObj->{$method}(...$args);
        }

        throw new HttpResponseException($respObj);
    }
1242639
public Object invoke(String methodName, Object... params){
		return ReflectUtil.invoke(this.bean, methodName, params);
	}
700453
public function call($path, $params = array(), $method = self::METHOD) {
    $url = $this->baseURI . $path;
    if ($this->key_type == 'opensearch') {
      $params['client_id'] = $this->clientId;
      $params['nonce'] = $this->_nonce();
      $params['sign'] = $this->_sign($params);
    } else {
      $params['Version'] = $this->version;
      $params['AccessKeyId'] = $this->accessKeyId;
      $params['SignatureMethod']=$this->signatureMethod;
      $params['SignatureVersion']=$this->signatureVersion;
      $params['SignatureNonce'] = $this->_nonce_aliyun();
      $params['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z');
      $params['Signature'] = $this->_sign_aliyun($params,$method);
    }
    if ($this->connect == 'curl') {
      $result = $this->_curl($url, $params, $method);
    } else {
      $result = $this->_socket($url, $params, $method);
    }
    return $result;
  }
1238857
private function callMethod($method, $params)
    {
        $params['chat_id'] = Conversation::get('lead_id');

        return giga_remote_post($this->getResource($method), $params);
    }
989541
private function request($url, $params = [], $method = 'GET')
    {
        // Set URL & Header
        curl_setopt($this->curl, CURLOPT_URL, $this->url . $url);
        curl_setopt($this->curl, CURLOPT_HTTPHEADER, array());

        //Add post vars
        if($method == 'POST')
        {
            curl_setopt($this->curl, CURLOPT_POST, count($params));
            curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
        }

        //Get result
        $result = curl_exec($this->curl);
        if($result === false)
            throw new \Exception('CURL error: ' . curl_error($this->curl));

        // decode results
        $result = json_decode($result, true);

        if(!is_array($result) || json_last_error())
            throw new \Exception('JSON decode error');

        return $result;

    }
166452
public function callMethod($methodName, array $parameters = array())
	{
		$this->_status = null;
		$this->_response = null;
		$this->_rawResponse = null;
		$this->_error = null;

		$parameters = array_values($parameters);

		$this->_id++;

		$input = json_encode(array(
			'method' => $methodName,
			'params' => $parameters,
			'id' => $this->_id
		));

		$curlResource = curl_init("{$this->_protocol}://{$this->_user}:{$this->_password}@{$this->_host}:{$this->_port}");
		$curlOptions = array(
			CURLOPT_RETURNTRANSFER => true,
			CURLOPT_FOLLOWLOCATION => true,
			CURLOPT_HTTPHEADER => array("Content-type: application/json"),
			CURLOPT_POST => true,
			CURLOPT_POSTFIELDS => $input,
		);

		if ($this->_protocol == 'https')
		{
			if ($this->_cert != null)
			{
				$curlOptions[CURLOPT_CAINFO] = $this->_cert;
				$curlOptions[CURLOPT_CAPATH] = dirname($this->_cert);
				$curlOptions[CURLOPT_SSL_VERIFYPEER] = true;
				$curlOptions[CURLOPT_SSL_VERIFYHOST] = true;
			}
			else
			{
				$curlOptions[CURLOPT_SSL_VERIFYPEER] = false;
				$curlOptions[CURLOPT_SSL_VERIFYHOST] = false;
			}
		}

		curl_setopt_array($curlResource, $curlOptions);

		$this->_rawResponse = curl_exec($curlResource);

		$this->_response = json_decode($this->_rawResponse,
			$this->getOption(self::OPTION_RESPONSE_FORMAT, self::RESPONSE_ASSOC_ARRAY) == self::RESPONSE_ASSOC_ARRAY);

		$this->_status = curl_getinfo($curlResource, CURLINFO_HTTP_CODE);

		$curlError = curl_error($curlResource);

		curl_close($curlResource);

		if ($curlError)
		{
			$this->_error = $curlError;

			return false;
		}

		if ($this->_response['error'])
		{
			$this->_error = $this->_response['error']['message'];
			$this->_errorCode = $this->_response['error']['code'];
		}
		else if ($this->_status != 200)
		{
			switch ($this->_status)
			{
				case 400:
					$this->_error = "HTTP_BAD_REQUEST";
					break;
				case 401:
					$this->_error = "HTTP_UNAUTHORIZED";
					break;
				case 403:
					$this->_error = "HTTP_FORBIDDEN";
					break;
				case 404:
					$this->_error = "HTTP_NOT_FOUND";
					break;
				default:
					throw new ChaincoinException("An unexpected http response code was encountered!");
			}
		}

		if ($this->_error)
		{
			return false;
		}

		return $this->_response['result'];
	}
237091
public function getCallable($methodName)
    {
        $this->checkMethodName($methodName);

        $class = $this->getClassName($methodName);
        $method = $this->getMethodName($methodName);

        $object = $this->createObject($class);

        if (!method_exists($object, $method)) {
            throw new JsonRpc\Exception\Method();
        }

        return array($object, $method);
    }
614454
public function redirectToRoute($routeName, array $parameters = [])
    {
        $url = $this->router->getRouteUrlByName($routeName, $parameters);
        if (!$url) {
            throw new \Parable\Framework\Exception("Can't redirect to route, '{$routeName}' does not exist.");
        }
        $this->response->redirect($this->url->getUrl($url));
    }
612348
public function invokeHook($methodName)
    {
        if (method_exists($this->getEntity(), $methodName)) {
            $this->getEntity()->$methodName(new FormHook($this));
        }
    }
260865
public function request(string $method, ...$params) : ResponseInterface
    {
        try {
            $response = $this->client
                ->post($this->path, $this->makeJson($method, $params));

            if ($response->hasError()) {
                // throw exception on error
                throw new BadRemoteCallException($response);
            }

            return $response;
        } catch (Throwable $exception) {
            throw exception()->handle($exception);
        }
    }
183959
public function callFunction($functionName, $parameters)
    {
        $parameters = is_array($parameters) ? $parameters : array();
        $response = call_user_func_array(array($this->getObject(), $functionName), $parameters);

        return $response;
    }
929430
function &methodNamed($methodName)
    {
        $return = NULL;
        if (isset($this->_methods[$methodName])) {
            $return =& $this->_methods[$methodName];
        }

        return $return;
    }
1268417
public function api($url, $method, array $params = [], array $headers = [])
    {
        try {
            return $this->sendRequest($method, $url, $params, $headers);
        } catch (\Exception $e) {
            sleep(2);
            return $this->sendRequest($method, $url, $params, $headers);
        }
    }