Prado\Util\TJsonRpcClient::__call PHP Метод

__call() публичный Метод

public __call ( $method, $parameters ) : mixed
Результат mixed RPC request result
    public function __call($method, $parameters)
    {
        // send request
        $_response = $this->performRequest($this->getServerUrl(), $this->encodeRequest($method, $parameters), 'application/json');
        // skip response handling if the request was just a notification request
        if ($this->isNotification) {
            return true;
        }
        // decode response
        if (($_response = json_decode($_response, true)) === null) {
            throw new TRpcClientResponseException('Empty response received');
        }
        // handle error response
        if (!is_null($_response['error'])) {
            throw new TRpcClientResponseException($_response['error']);
        }
        return $_response['result'];
    }