Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StreamHandler.php

function StreamHandler::add_progress

Parameters

mixed $value as passed via Request transfer options.:

File

vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php, line 549

Class

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

Namespace

GuzzleHttp\Handler

Code

private function add_progress(RequestInterface $request, array &$options, $value, array &$params) : void {
    self::addNotification($params, static function ($code, $a, $b, $c, $transferred, $total) use ($value) {
        if ($code == \STREAM_NOTIFY_PROGRESS) {
            // The upload progress cannot be determined. Use 0 for cURL compatibility:
            // https://curl.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html
            $value($total, $transferred, 0, 0);
        }
    });
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal