\GuzzleHttpTransferStats

Represents data at the point after it was transferred either successfully or after a network error.

Summary

Methods
Properties
Constants
__construct()
getRequest()
getResponse()
hasResponse()
getHandlerErrorData()
getEffectiveUri()
getTransferTime()
getHandlerStats()
getHandlerStat()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$request
$response
$transferTime
$handlerStats
$handlerErrorData
N/A

Properties

$request

$request : 

Type

$response

$response : 

Type

$transferTime

$transferTime : 

Type

$handlerStats

$handlerStats : 

Type

$handlerErrorData

$handlerErrorData : 

Type

Methods

__construct()

__construct(\Psr\Http\Message\RequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response = null, null  $transferTime = null, mixed  $handlerErrorData = null, array  $handlerStats = array()) 

Parameters

\Psr\Http\Message\RequestInterface $request

Request that was sent.

\Psr\Http\Message\ResponseInterface $response

Response received (if any)

null $transferTime

Total handler transfer time.

mixed $handlerErrorData

Handler error data.

array $handlerStats

Handler specific stats.

hasResponse()

hasResponse() : boolean

Returns true if a response was received.

Returns

boolean

getHandlerErrorData()

getHandlerErrorData() : mixed

Gets handler specific error data.

This might be an exception, a integer representing an error code, or anything else. Relying on this value assumes that you know what handler you are using.

Returns

mixed

getEffectiveUri()

getEffectiveUri() : \Psr\Http\Message\UriInterface

Get the effective URI the request was sent to.

Returns

\Psr\Http\Message\UriInterface

getTransferTime()

getTransferTime() : float

Get the estimated time the request was being transferred by the handler.

Returns

float —

Time in seconds.

getHandlerStats()

getHandlerStats() : array

Gets an array of all of the handler specific transfer data.

Returns

array

getHandlerStat()

getHandlerStat(string  $stat) : mixed|null

Get a specific handler statistic from the handler by name.

Parameters

string $stat

Handler specific transfer stat to retrieve.

Returns

mixed|null