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

public __construct(Psr\Http\Message\RequestInterface $request, ?Psr\Http\Message\ResponseInterface $response = NULL, ?float $transferTime = NULL, $handlerErrorData = NULL, array $handlerStats = [])
  • param \RequestInterface $request Request that was sent.
  • param \ResponseInterface|null $response Response received (if any)
  • param float|null $transferTime Total handler transfer time.
  • param mixed $handlerErrorData Handler error data.
  • param array $handlerStats Handler specific stats.
public getEffectiveUri() : Psr\Http\Message\UriInterface

Get the effective URI the request was sent to.

public getHandlerErrorData()

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.

  • return mixed
public getHandlerStat(string $stat)

Get a specific handler statistic from the handler by name.

  • param string $stat Handler specific transfer stat to retrieve.
  • return mixed|null
public getHandlerStats() : array

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

public getRequest() : Psr\Http\Message\RequestInterface
public getResponse() : ?Psr\Http\Message\ResponseInterface

Returns the response that was received (if any).

public getTransferTime() : ?float

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

  • return float|null Time in seconds.
public hasResponse() : bool

Returns true if a response was received.

private $handlerErrorData = NULL
  • var mixed|null
private $handlerStats = NULL
  • var array
private $request = NULL
  • var \RequestInterface
private $response = NULL
  • var \ResponseInterface|null
private $transferTime = NULL
  • var float|null
© 2024 Bruce Wells
Search Namespaces \ Classes