public function toArray()
    {
        if ($this->getResponseType() == 'application/json')
        {
            $response = $this->convertJsonToArray($this->getBody());
        }
        elseif ($this->getResponseType() == 'application/binary')
        {
            $response = $this->convertSerializedToArray($this->getBody());
        }
        else
        {
            $response = null;
        }

        if ( ! is_array($response))
        {
            $this->throwResponseConversionException();
        }

        return $response;
    }
public function toArray()
    {
        if ($this->getResponseType() == 'application/json')
        {
            $response = $this->convertJsonToArray($this->getBody());
        }
        elseif ($this->getResponseType() == 'application/binary')
        {
            $response = $this->convertSerializedToArray($this->getBody());
        }
        else
        {
            $response = null;
        }

        if ( ! is_array($response))
        {
            $this->throwResponseConversionException();
        }

        return $response;
    }
public function toArray ( ) { if ( $ this -> getResponseType ( ) == 'application/json' ) { $ response = $ this -> convertJsonToArray ( $ this -> getBody ( ) ) ; } elseif ( $ this -> getResponseType ( ) == 'application/binary' ) { $ response = $ this -> convertSerializedToArray ( $ this -> getBody ( ) ) ; } else { $ response = null ; } if ( ! is_array ( $ response ) ) { $ this -> throwResponseConversionException ( ) ; } return $ response ; }
Convert the response body to an array

@return array
@throws ResponseConversionException
Convert the response body to an array