\CheddarGetter_Client_ZendAdapter

Adapter implementation based on Zend_Http_Client for requesting the CheddarGetter service

Summary

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

Properties

$_client

$_client : \Zend_Http_Client|null

Http client object

Type

\Zend_Http_Client|null

Methods

__construct()

__construct(\Zend_Http_Client $client)

Constructor

Accepts a Zend_Http_Client argument enabling the implementer to use a custom client (custom stream context, etc). Unless specified, a default client is used with some common stream context options

Parameters

\Zend_Http_Client $client

Throws

\CheddarGetter_Client_Exception

Throws an exception if Zend_Http_Client 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

\Zend_Http_Client_Exception

A Zend_Http_Client_Exception may be thrown under a number of conditions but most likely if the tcp socket fails to connect.

Returns

string —

Body of the response from the CheddarGetter API

getClient()

getClient() : null|\Zend_Http_Client

Get the http client object

Returns

null|\Zend_Http_Client