PHP Class Elastica\Cluster\Settings

Afficher le fichier Open project: ruflin/elastica Class Usage Examples

Protected Properties

Свойство Type Description
$_client Client object

Méthodes publiques

Méthode Description
__construct ( Client $client ) Creates a cluster object.
get ( ) : array Returns settings data.
getClient ( ) : Client Get the client.
getPersistent ( string $setting = '' ) : array | string | null Returns the current persistent settings of the cluster.
getTransient ( string $setting = '' ) : array | string | null Returns the current transient settings of the cluster.
request ( array $data = [], string $method = Request::GET ) : Response Sends settings request.
set ( array $settings ) : Response Set settings for cluster.
setPersistent ( string $key, string $value ) : Response Sets persistent setting.
setReadOnly ( boolean $readOnly = true, boolean $persistent = false ) : Response Sets the cluster to read only.
setTransient ( string $key, string $value ) : Response Sets transient settings.

Method Details

__construct() public méthode

Creates a cluster object.
public __construct ( Client $client )
$client Elastica\Client Connection client object

get() public méthode

Returns settings data.
public get ( ) : array
Résultat array Settings data (persistent and transient)

getClient() public méthode

Get the client.
public getClient ( ) : Client
Résultat Elastica\Client

getPersistent() public méthode

If param is set, only specified setting is return.
public getPersistent ( string $setting = '' ) : array | string | null
$setting string OPTIONAL Setting name to return
Résultat array | string | null Settings data

getTransient() public méthode

If param is set, only specified setting is return.
public getTransient ( string $setting = '' ) : array | string | null
$setting string OPTIONAL Setting name to return
Résultat array | string | null Settings data

request() public méthode

Sends settings request.
public request ( array $data = [], string $method = Request::GET ) : Response
$data array OPTIONAL Data array
$method string OPTIONAL Transfer method (default = \Elastica\Request::GET)
Résultat Elastica\Response Response object

set() public méthode

Set settings for cluster.
public set ( array $settings ) : Response
$settings array Raw settings (including persistent or transient)
Résultat Elastica\Response

setPersistent() public méthode

Sets persistent setting.
public setPersistent ( string $key, string $value ) : Response
$key string
$value string
Résultat Elastica\Response

setReadOnly() public méthode

Second param can be used to set it persistent
public setReadOnly ( boolean $readOnly = true, boolean $persistent = false ) : Response
$readOnly boolean
$persistent boolean
Résultat Elastica\Response $response

setTransient() public méthode

Sets transient settings.
public setTransient ( string $key, string $value ) : Response
$key string
$value string
Résultat Elastica\Response

Property Details

$_client protected_oe property

Client object
protected $_client