Class TransferStats
Represents data at the point after it was transferred either successfully
or after a network error.
Methods summary
public
|
#
__construct( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, null $transferTime = null, mixed $handlerErrorData = null, array $handlerStats = [] )
Parameters
- $request
- Request that was sent.
- $response
- Response received (if any)
- $transferTime
- Total handler transfer time.
- $handlerErrorData
- Handler error data.
- $handlerStats
- Handler specific stats.
|
public
Psr\Http\Message\RequestInterface
|
|
public
Psr\Http\Message\ResponseInterface |null
|
#
getResponse( )
Returns the response that was received (if any).
Returns the response that was received (if any).
Returns
|
public
boolean
|
#
hasResponse( )
Returns true if a response was received.
Returns true if a response was received.
Returns
boolean
|
public
mixed
|
#
getHandlerErrorData( )
Gets handler specific error data.
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
|
public
Psr\Http\Message\UriInterface
|
#
getEffectiveUri( )
Get the effective URI the request was sent to.
Get the effective URI the request was sent to.
Returns
|
public
float
|
#
getTransferTime( )
Get the estimated time the request was being transferred by the handler.
Get the estimated time the request was being transferred by the handler.
Returns
float Time in seconds.
|
public
array
|
#
getHandlerStats( )
Gets an array of all of the handler specific transfer data.
Gets an array of all of the handler specific transfer data.
Returns
array
|
public
mixed|null
|
#
getHandlerStat( string $stat )
Get a specific handler statistic from the handler by name.
Get a specific handler statistic from the handler by name.
Parameters
- $stat
- Handler specific transfer stat to retrieve.
Returns
mixed|null
|