WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

YoastSEO_Vendor\GuzzleHttp\Handler

StreamHandler::__invoke() public Yoast 1.0

Sends an HTTP request.

{} Это метод класса: StreamHandler{}

Хуков нет.

Возвращает

PromiseInterface.

Использование

$StreamHandler = new StreamHandler();
$StreamHandler->__invoke( \YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, $options );
$request(Requestчислоerface) (обязательный)
Request to send.
$options(массив) (обязательный)
Request transfer options.

Код StreamHandler::__invoke() Yoast 15.6.2

<?php
public function __invoke(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, array $options)
{
    // Sleep if there is a delay specified.
    if (isset($options['delay'])) {
        \usleep($options['delay'] * 1000);
    }
    $startTime = isset($options['on_stats']) ? \microtime(\true) : null;
    try {
        // Does not support the expect header.
        $request = $request->withoutHeader('Expect');
        // Append a content-length header if body size is zero to match
        // cURL's behavior.
        if (0 === $request->getBody()->getSize()) {
            $request = $request->withHeader('Content-Length', 0);
        }
        return $this->createResponse($request, $options, $this->createStream($request, $options), $startTime);
    } catch (\InvalidArgumentException $e) {
        throw $e;
    } catch (\Exception $e) {
        // Determine if the error was a networking error.
        $message = $e->getMessage();
        // This list can probably get more comprehensive.
        if (\strpos($message, 'getaddrinfo') || \strpos($message, 'Connection refused') || \strpos($message, "couldn't connect to host") || \strpos($message, "connection attempt failed")) {
            $e = new \YoastSEO_Vendor\GuzzleHttp\Exception\ConnectException($e->getMessage(), $request, $e);
        }
        $e = \YoastSEO_Vendor\GuzzleHttp\Exception\RequestException::wrapException($request, $e);
        $this->invokeStats($options, $request, $startTime, null, $e);
        return \YoastSEO_Vendor\GuzzleHttp\Promise\rejection_for($e);
    }
}