abstract class AbstractCurl extends AbstractClient

Base client class with helpers for working with cURL.

Properties

protected $ignoreErrors from AbstractClient
protected $maxRedirects from AbstractClient
protected $timeout from AbstractClient
protected $verifyPeer from AbstractClient
protected $verifyHost from AbstractClient
protected $proxy from AbstractClient
protected $options

Methods

setIgnoreErrors($ignoreErrors)

No description

getIgnoreErrors()

No description

setMaxRedirects($maxRedirects)

No description

getMaxRedirects()

No description

setTimeout($timeout)

No description

getTimeout()

No description

setVerifyPeer($verifyPeer)

No description

getVerifyPeer()

No description

getVerifyHost()

No description

setVerifyHost($verifyHost)

No description

setProxy($proxy)

No description

getProxy()

No description

__construct()

No description

static resource
createCurlHandle()

Creates a new cURL resource.

static 
populateResponse(resource $curl, string $raw, MessageInterface $response)

Populates a response object.

setOption(integer $option, mixed $value)

Stashes a cURL option to be set on send, when the resource is created.

prepare($curl, RequestInterface $request, array $options = array())

No description

Details

in AbstractClient at line 18
setIgnoreErrors($ignoreErrors)

Parameters

$ignoreErrors

in AbstractClient at line 23
getIgnoreErrors()

in AbstractClient at line 28
setMaxRedirects($maxRedirects)

Parameters

$maxRedirects

in AbstractClient at line 33
getMaxRedirects()

in AbstractClient at line 38
setTimeout($timeout)

Parameters

$timeout

in AbstractClient at line 43
getTimeout()

in AbstractClient at line 48
setVerifyPeer($verifyPeer)

Parameters

$verifyPeer

in AbstractClient at line 53
getVerifyPeer()

in AbstractClient at line 58
getVerifyHost()

in AbstractClient at line 63
setVerifyHost($verifyHost)

Parameters

$verifyHost

in AbstractClient at line 68
setProxy($proxy)

Parameters

$proxy

in AbstractClient at line 73
getProxy()

at line 17
__construct()

at line 36
static protected resource createCurlHandle()

Creates a new cURL resource.

Return Value

resource A new cURL resource

Exceptions

FLeaderApiException If unable to create a cURL resource

See also

curl_init()

at line 56
static protected populateResponse(resource $curl, string $raw, MessageInterface $response)

Populates a response object.

Parameters

resource $curl A cURL resource
string $raw The raw response string
MessageInterface $response The response object

at line 163
setOption(integer $option, mixed $value)

Stashes a cURL option to be set on send, when the resource is created.

If the supplied value it set to null the option will be removed.

Parameters

integer $option The option
mixed $value The value

See also

curl_setopt()

at line 177
protected prepare($curl, RequestInterface $request, array $options = array())

Parameters

$curl
RequestInterface $request
array $options