class Parser (View source)

Methods

__construct($ch)

Parser constructor.

mixed|null
raw()

Get raw content

mixed|null
getContent()

Get response content

string
toJson(array $default = null)

Get response content as json

array|mixed
toArray()

Get response content as array

array
getHeaders()

Get the response headers

string
getCode()

Get the response code

string
getExecutionTime()

Get the response executing time

string
getConnexionTime()

Get the request connexion time

string
getUploadSize()

Get the response upload size

string
getUploadSpeed()

Get the request upload speed

string
getDownloadSize()

Get the download size

string
getDownloadSpeed()

Get the downlad speed

string
getErrorMessage()

Get error message

int
getErrorNumber()

Get error code

string
getContentType()

Get the response content type

void
addAttach(array $attach)

Add attach file

array
getAttach()

Get attach files

void
setAttach(array $attachs)

Set attach files

Details

__construct($ch)

Parser constructor.

Parameters

$ch

mixed|null raw()

Get raw content

Return Value

mixed|null

Exceptions

mixed|null getContent()

Get response content

Return Value

mixed|null

Exceptions

string toJson(array $default = null)

Get response content as json

Parameters

array $default

Return Value

string

Exceptions

array|mixed toArray()

Get response content as array

Return Value

array|mixed

Exceptions

array getHeaders()

Get the response headers

Return Value

array

Exceptions

string getCode()

Get the response code

Return Value

string

Exceptions

string getExecutionTime()

Get the response executing time

Return Value

string

Exceptions

string getConnexionTime()

Get the request connexion time

Return Value

string

Exceptions

string getUploadSize()

Get the response upload size

Return Value

string

Exceptions

string getUploadSpeed()

Get the request upload speed

Return Value

string

Exceptions

string getDownloadSize()

Get the download size

Return Value

string

Exceptions

string getDownloadSpeed()

Get the downlad speed

Return Value

string

Exceptions

string getErrorMessage()

Get error message

Return Value

string

Exceptions

int getErrorNumber()

Get error code

Return Value

int

Exceptions

string getContentType()

Get the response content type

Return Value

string

Exceptions

void addAttach(array $attach)

Add attach file

Parameters

array $attach

Return Value

void

array getAttach()

Get attach files

Return Value

array

void setAttach(array $attachs)

Set attach files

Parameters

array $attachs

Return Value

void