You are here

private function StreamHandler::invokeStats in Lockr 7.3

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 74

Class

StreamHandler
HTTP handler that uses PHP's HTTP stream wrapper.

Namespace

GuzzleHttp\Handler

Code

private function invokeStats(array $options, RequestInterface $request, $startTime, ResponseInterface $response = null, $error = null) {
  if (isset($options['on_stats'])) {
    $stats = new TransferStats($request, $response, microtime(true) - $startTime, $error, []);
    call_user_func($options['on_stats'], $stats);
  }
}