\CheddarGetter_Client_CurlAdapter

Adapter implementation based on php-curl for requesting the CheddarGetter service

Summary

Methods
Properties
Constants
__construct()
request()
getCurlResource()
No public properties found
No constants found
No protected methods found
$_resource
N/A
No private methods found
No private properties found
N/A

Properties

$_resource

$_resource : resource|null

The curl resource

Type

resource|null

Methods

__construct()

__construct(resource $resource)

Constructor

Parameters

resource $resource

Throws

\CheddarGetter_Client_Exception

Throws an exception if php-curl is not available.

request()

request(string $url, string $username, string $password, array|null $args) : string

Execute CheddarGetter API request

Parameters

string $url

Url to the API action

string $username

Username

string $password

Password

array|null $args

HTTP post key value pairs

Throws

\CheddarGetter_Client_Exception

Throws an exception if the curl session results in an error.

Returns

string —

Body of the response from the CheddarGetter API

getCurlResource()

getCurlResource() : null|resource

Get the curl resource if set

Returns

null|resource