class Response (View source)

Properties

string|null $content

Define the request content

Methods

__construct(CurlHandle $ch, string|null $content = null)

Parser constructor.

string|null
getContent()

Get response content

object|array
toJson(bool|null $associative = null)

Get response content as json

array
toArray()

Get response content as json

array
getHeaders()

Get the response headers

int|null
getCode()

Get the response code

int|null
statusCode()

Alias of getCode

bool
isSuccessful()

Check if status code is successful

bool
isFailed()

Check if status code is failed

int|null
getExecutionTime()

Get the response executing time

float|null
getConnexionTime()

Get the request connexion time

float|null
getUploadSize()

Get the response upload size

float|null
getUploadSpeed()

Get the request upload speed

float|null
getDownloadSize()

Get the download size

float|null
getDownloadSpeed()

Get the downlad speed

string
getErrorMessage()

Get error message

int
getErrorNumber()

Get error code

string|null
getContentType()

Get the response content type

Details

__construct(CurlHandle $ch, string|null $content = null)

Parser constructor.

Parameters

CurlHandle $ch
string|null $content

string|null getContent()

Get response content

Return Value

string|null

object|array toJson(bool|null $associative = null)

Get response content as json

Parameters

bool|null $associative

Return Value

object|array

array toArray()

Get response content as json

Return Value

array

array getHeaders()

Get the response headers

Return Value

array

int|null getCode()

Get the response code

Return Value

int|null

int|null statusCode()

Alias of getCode

Return Value

int|null

bool isSuccessful()

Check if status code is successful

Return Value

bool

bool isFailed()

Check if status code is failed

Return Value

bool

int|null getExecutionTime()

Get the response executing time

Return Value

int|null

float|null getConnexionTime()

Get the request connexion time

Return Value

float|null

float|null getUploadSize()

Get the response upload size

Return Value

float|null

float|null getUploadSpeed()

Get the request upload speed

Return Value

float|null

float|null getDownloadSize()

Get the download size

Return Value

float|null

float|null getDownloadSpeed()

Get the downlad speed

Return Value

float|null

string getErrorMessage()

Get error message

Return Value

string

int getErrorNumber()

Get error code

Return Value

int

string|null getContentType()

Get the response content type

Return Value

string|null