PHP Class GuzzleHttp\Handler\CurlFactory

Inheritance: implements GuzzleHttp\Handler\CurlFactoryInterface
Show file Open project: guzzle/guzzle Class Usage Examples

Public Methods

Method Description
__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 )

Private Methods

Method Description
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.

Method Details

__construct() public method

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

create() public method

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

finish() public static method

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
return GuzzleHttp\Promise\PromiseInterface

release() public method

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