abstract class AbstractHTTPClient implements Client (View source)

Basic couch DB connection handling class.

Properties

protected array $options CouchDB connection options.

Methods

__construct(string $host = 'localhost', int $port = 5984, string $username = null, string $password = null, string $ip = null, bool $ssl = false, string $path = null, int $timeout = 10, array $headers = [])

Construct a CouchDB connection.

void
setOption(string $option, mixed $value)

Set option value.

array
getOptions()

Get the connection options.

Details

AbstractHTTPClient __construct(string $host = 'localhost', int $port = 5984, string $username = null, string $password = null, string $ip = null, bool $ssl = false, string $path = null, int $timeout = 10, array $headers = [])

Construct a CouchDB connection.

Construct a CouchDB connection from basic connection parameters for one given database.

Parameters

string $host
int $port
string $username
string $password
string $ip
bool $ssl
string $path
int $timeout
array $headers

Return Value

AbstractHTTPClient

void setOption(string $option, mixed $value)

Set option value.

Set the value for an connection option. Throws an InvalidArgumentException for unknown options.

Parameters

string $option
mixed $value

Return Value

void

Exceptions

InvalidArgumentException

array getOptions()

Get the connection options.

Return Value

array