src/Client.php
protected function process_response($response_json)
    {
        $response = json_decode($response_json);
        $this->catch_json_last_error();
        $this->last_results_raw = $response;
        if (isset($response->meta->rc)) {
            if ($response->meta->rc === 'ok') {
                $this->last_error_message = null;
                if (is_array($response->data)) {
                    return $response->data;
                }

                return true;
            } elseif ($response->meta->rc === 'error') {
                /**
                 * we have an error:
                 * set $this->set last_error_message if the returned error message is available
                 */
                if (isset($response->meta->msg)) {
                    $this->last_error_message = $response->meta->msg;
                }
                if ($this->debug) {
                    trigger_error('Debug: Last error message: ' . $this->last_error_message);
                }
            }
        }

        return false;
    }
protected function process_response($response_json)
    {
        $response = json_decode($response_json);
        $this->catch_json_last_error();
        $this->last_results_raw = $response;
        if (isset($response->meta->rc)) {
            if ($response->meta->rc === 'ok') {
                $this->last_error_message = null;
                if (is_array($response->data)) {
                    return $response->data;
                }

                return true;
            } elseif ($response->meta->rc === 'error') {
                /**
                 * we have an error:
                 * set $this->set last_error_message if the returned error message is available
                 */
                if (isset($response->meta->msg)) {
                    $this->last_error_message = $response->meta->msg;
                }
                if ($this->debug) {
                    trigger_error('Debug: Last error message: ' . $this->last_error_message);
                }
            }
        }

        return false;
    }
protected function process_response ( $ response_json ) { $ response = json_decode ( $ response_json ) ; $ this -> catch_json_last_error ( ) ; $ this -> last_results_raw = $ response ; if ( isset ( $ response -> meta -> rc ) ) { if ( $ response -> meta -> rc === 'ok' ) { $ this -> last_error_message = null ; if ( is_array ( $ response -> data ) ) { return $ response -> data ; } return true ; } elseif ( $ response -> meta -> rc === 'error' ) { /**
                 * we have an error:
                 * set $this->set last_error_message if the returned error message is available
                 */ if ( isset ( $ response -> meta -> msg ) ) { $ this -> last_error_message = $ response -> meta -> msg ; } if ( $ this -> debug ) { trigger_error ( 'Debug: Last error message: ' . $ this -> last_error_message ) ; } } } return false ; }
Process regular responses where output is the content of the data array
Process regular responses where output is the content of the data array