function StreamHandler::invokeStats
2 calls to StreamHandler::invokeStats()
- StreamHandler::createResponse in vendor/
guzzlehttp/ guzzle/ src/ Handler/ StreamHandler.php - StreamHandler::__invoke in vendor/
guzzlehttp/ guzzle/ src/ Handler/ StreamHandler.php - Sends an HTTP request.
File
-
vendor/
guzzlehttp/ guzzle/ src/ Handler/ StreamHandler.php, line 88
Class
- StreamHandler
- HTTP handler that uses PHP's HTTP stream wrapper.
Namespace
GuzzleHttp\HandlerCode
private function invokeStats(array $options, RequestInterface $request, ?float $startTime, ?ResponseInterface $response = null, ?\Throwable $error = null) : void {
if (isset($options['on_stats'])) {
$stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []);
$options['on_stats']($stats);
}
}