Open Monograph Press  3.3.0
GuzzleHttp\Handler\CurlFactory Class Reference
Inheritance diagram for GuzzleHttp\Handler\CurlFactory:
GuzzleHttp\Handler\CurlFactoryInterface

Public Member Functions

 __construct ($maxHandles)
 
 create (RequestInterface $request, array $options)
 
 release (EasyHandle $easy)
 

Static Public Member Functions

static finish (callable $handler, EasyHandle $easy, CurlFactoryInterface $factory)
 

Data Fields

const CURL_VERSION_STR = 'curl_version'
 
const LOW_CURL_VERSION_NUMBER = '7.21.2'
 

Detailed Description

Creates curl resources from a request

Definition at line 15 of file CurlFactory.php.

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\Handler\CurlFactory::__construct (   $maxHandles)
Parameters
int$maxHandlesMaximum number of idle handles.

Definition at line 35 of file CurlFactory.php.

Member Function Documentation

◆ create()

GuzzleHttp\Handler\CurlFactory::create ( RequestInterface  $request,
array  $options 
)

Creates a cURL handle resource.

Parameters
RequestInterface$requestRequest
array$optionsTransfer options
Returns
EasyHandle
Exceptions

Implements GuzzleHttp\Handler\CurlFactoryInterface.

Definition at line 40 of file CurlFactory.php.

◆ finish()

static GuzzleHttp\Handler\CurlFactory::finish ( callable  $handler,
EasyHandle  $easy,
CurlFactoryInterface  $factory 
)
static

Completes a cURL transaction, either returning a response promise or a rejected promise.

Parameters
callable$handler
EasyHandle$easy
CurlFactoryInterface$factoryDictates how the handle is released
Returns
\GuzzleHttp\Promise\PromiseInterface

Definition at line 101 of file CurlFactory.php.

References GuzzleHttp\Handler\CurlFactoryInterface\release().

Referenced by GuzzleHttp\Handler\CurlHandler\__invoke().

◆ release()

GuzzleHttp\Handler\CurlFactory::release ( EasyHandle  $easy)

Release an easy handle, allowing it to be reused or closed.

This function must call unset on the easy handle's "handle" property.

Parameters
EasyHandle$easy

Implements GuzzleHttp\Handler\CurlFactoryInterface.

Definition at line 70 of file CurlFactory.php.

Field Documentation

◆ CURL_VERSION_STR

const GuzzleHttp\Handler\CurlFactory::CURL_VERSION_STR = 'curl_version'

Definition at line 17 of file CurlFactory.php.

◆ LOW_CURL_VERSION_NUMBER

const GuzzleHttp\Handler\CurlFactory::LOW_CURL_VERSION_NUMBER = '7.21.2'

Definition at line 18 of file CurlFactory.php.


The documentation for this class was generated from the following file: