Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
GuzzleHttp\TransferStats Class Reference

Public Member Functions

 __construct (RequestInterface $request, ?ResponseInterface $response=null, ?float $transferTime=null, $handlerErrorData=null, array $handlerStats=[])
 
 getEffectiveUri ()
 Get the effective URI the request was sent to.
 
 getHandlerErrorData ()
 Gets handler specific error data.
 
 getHandlerStat (string $stat)
 Get a specific handler statistic from the handler by name.
 
 getHandlerStats ()
 Gets an array of all of the handler specific transfer data.
 
 getRequest ()
 
 getResponse ()
 Returns the response that was received (if any).
 
 getTransferTime ()
 Get the estimated time the request was being transferred by the handler.
 
 hasResponse ()
 Returns true if a response was received.
 

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\TransferStats::__construct ( RequestInterface $request,
?ResponseInterface $response = null,
?float $transferTime = null,
$handlerErrorData = null,
array $handlerStats = [] )
Parameters
RequestInterface$requestRequest that was sent.
ResponseInterface | null$responseResponse received (if any)
float | null$transferTimeTotal handler transfer time.
mixed$handlerErrorDataHandler error data.
array$handlerStatsHandler specific stats.

Member Function Documentation

◆ getHandlerErrorData()

GuzzleHttp\TransferStats::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 values
mixed

◆ getHandlerStat()

GuzzleHttp\TransferStats::getHandlerStat ( string $stat)

Get a specific handler statistic from the handler by name.

Parameters
string$statHandler specific transfer stat to retrieve.
Return values
mixed|null

◆ getTransferTime()

GuzzleHttp\TransferStats::getTransferTime ( )

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

Return values
float|nullTime in seconds.

The documentation for this class was generated from the following file: