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