\ElasticaClientConfiguration

Elastica client configuration.

Summary

Methods
Properties
Constants
fromArray()
fromDsn()
get()
has()
getAll()
set()
add()
No public properties found
No constants found
No protected methods found
$configuration
N/A
No private methods found
No private properties found
N/A

Properties

$configuration

$configuration : array

Config with defaults.

retryOnConflict: Use in \Elastica\Client::updateDocument bigintConversion: Set to true to enable the JSON bigint to string conversion option (see issue #717)

Type

array

Methods

fromArray()

fromArray(array  $config) : \Elastica\ClientConfiguration

Create configuration.

Parameters

array $config

Additional config

Returns

\Elastica\ClientConfiguration

fromDsn()

fromDsn(string  $dsn) : \Elastica\ClientConfiguration

Create configuration from Dsn string.

Parameters

string $dsn

Returns

\Elastica\ClientConfiguration

get()

get(string  $key) : mixed

Returns a specific config key or the whole config array if not set.

Parameters

string $key

Config key

Throws

\Elastica\Exception\InvalidException

Returns

mixed —

Config value

has()

has(string  $key) : boolean

Returns boolean indicates if configuration has key.

Parameters

string $key

Key to check

Returns

boolean

getAll()

getAll() : array

Return all configuration.

Returns

array

set()

set(string  $key, mixed  $value) 

Parameters

string $key

Key to set

mixed $value

Value

add()

add(string  $key, mixed  $value) 

Add value to a key. If original value is not an array, value is wrapped.

Parameters

string $key

Key to add

mixed $value

Value