\AdventureRes\HttpClients AdventureResCurl

Class AdventureResCurl Abstraction for the procedural curl elements so that curl can be mocked and the implementation can be tested.

Summary

Methods
Properties
Constants
init()
setopt()
setoptArray()
exec()
errno()
error()
getinfo()
version()
close()
No public properties found
No constants found
No protected methods found
$curl
N/A
No private methods found
No private properties found
N/A

Properties

$curl

$curl : resource

Type

resource — Curl resource instance

Methods

init()

init() 

Make a new curl reference instance

setopt()

setopt(  $key,   $value) 

Set a curl option

Parameters

$key
$value

setoptArray()

setoptArray(array  $options) 

Set an array of options to a curl resource

Parameters

array $options

exec()

exec() : mixed

Send a curl request

Returns

mixed

errno()

errno() : integer

Return the curl error number

Returns

integer

error()

error() : string

Return the curl error message

Returns

string

getinfo()

getinfo(  $type) : mixed

Get info from a curl reference

Parameters

$type

Returns

mixed

version()

version() : array

Get the currently installed curl version

Returns

array

close()

close() 

Close the resource connection to curl