PHP Класс GuzzleHttp\Handler\CurlFactory

Наследование: implements GuzzleHttp\Handler\CurlFactoryInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( integer $maxHandles )
create ( Psr\Http\Message\RequestInterface $request, array $options )
finish ( callable $handler, GuzzleHttp\Handler\EasyHandle $easy, GuzzleHttp\Handler\CurlFactoryInterface $factory ) : GuzzleHttp\Promise\PromiseInterface Completes a cURL transaction, either returning a response promise or a rejected promise.
release ( GuzzleHttp\Handler\EasyHandle $easy )

Приватные методы

Метод Описание
applyBody ( Psr\Http\Message\RequestInterface $request, array $options, array &$conf )
applyHandlerOptions ( GuzzleHttp\Handler\EasyHandle $easy, array &$conf )
applyHeaders ( GuzzleHttp\Handler\EasyHandle $easy, array &$conf )
applyMethod ( GuzzleHttp\Handler\EasyHandle $easy, array &$conf )
createHeaderFn ( GuzzleHttp\Handler\EasyHandle $easy )
createRejection ( GuzzleHttp\Handler\EasyHandle $easy, array $ctx )
finishError ( callable $handler, GuzzleHttp\Handler\EasyHandle $easy, GuzzleHttp\Handler\CurlFactoryInterface $factory )
getDefaultConf ( GuzzleHttp\Handler\EasyHandle $easy )
invokeStats ( GuzzleHttp\Handler\EasyHandle $easy )
removeHeader ( string $name, array &$options ) Remove a header from the options array.
retryFailedRewind ( callable $handler, GuzzleHttp\Handler\EasyHandle $easy, array $ctx ) This function ensures that a response was set on a transaction. If one was not set, then the request is retried if possible. This error typically means you are sending a payload, curl encountered a "Connection died, retrying a fresh connect" error, tried to rewind the stream, and then encountered a "necessary data rewind wasn't possible" error, causing the request to be sent through curl_multi_info_read() without an error status.

Описание методов

__construct() публичный Метод

public __construct ( integer $maxHandles )
$maxHandles integer Maximum number of idle handles.

create() публичный Метод

public create ( Psr\Http\Message\RequestInterface $request, array $options )
$request Psr\Http\Message\RequestInterface
$options array

finish() публичный статический Метод

Completes a cURL transaction, either returning a response promise or a rejected promise.
public static finish ( callable $handler, GuzzleHttp\Handler\EasyHandle $easy, GuzzleHttp\Handler\CurlFactoryInterface $factory ) : GuzzleHttp\Promise\PromiseInterface
$handler callable
$easy GuzzleHttp\Handler\EasyHandle
$factory GuzzleHttp\Handler\CurlFactoryInterface Dictates how the handle is released
Результат GuzzleHttp\Promise\PromiseInterface

release() публичный Метод

public release ( GuzzleHttp\Handler\EasyHandle $easy )
$easy GuzzleHttp\Handler\EasyHandle