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

Breadcrumb

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

function CurlMultiHandler::__invoke

File

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

Class

CurlMultiHandler
Returns an asynchronous response using curl_multi_* functions.

Namespace

GuzzleHttp\Handler

Code

public function __invoke(RequestInterface $request, array $options) : PromiseInterface {
    $easy = $this->factory
        ->create($request, $options);
    $id = (int) $easy->handle;
    $promise = new Promise([
        $this,
        'execute',
    ], function () use ($id) {
        return $this->cancel($id);
    });
    $this->addRequest([
        'easy' => $easy,
        'deferred' => $promise,
    ]);
    return $promise;
}

API Navigation

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