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

Breadcrumb

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

function CurlMultiHandler::__construct

This handler accepts the following options:

  • handle_factory: An optional factory used to create curl handles
  • select_timeout: Optional timeout (in seconds) to block before timing out while selecting curl handles. Defaults to 1 second.
  • options: An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt()

File

vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php, line 69

Class

CurlMultiHandler
Returns an asynchronous response using curl_multi_* functions.

Namespace

GuzzleHttp\Handler

Code

public function __construct(array $options = []) {
    $this->factory = $options['handle_factory'] ?? new CurlFactory(50);
    if (isset($options['select_timeout'])) {
        $this->selectTimeout = $options['select_timeout'];
    }
    elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
        @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED);
        $this->selectTimeout = (int) $selectTimeout;
    }
    else {
        $this->selectTimeout = 1;
    }
    $this->options = $options['options'] ?? [];
    // unsetting the property forces the first access to go through
    // __get().
    unset($this->_mh);
}

API Navigation

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