PHP Класс Elastica\Cluster\Settings

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_client Client object

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

get() публичный Метод

Returns settings data.
public get ( ) : array
Результат array Settings data (persistent and transient)

getClient() публичный Метод

Get the client.
public getClient ( ) : Client
Результат Elastica\Client

getPersistent() публичный Метод

If param is set, only specified setting is return.
public getPersistent ( string $setting = '' ) : array | string | null
$setting string OPTIONAL Setting name to return
Результат array | string | null Settings data

getTransient() публичный Метод

If param is set, only specified setting is return.
public getTransient ( string $setting = '' ) : array | string | null
$setting string OPTIONAL Setting name to return
Результат array | string | null Settings data

request() публичный Метод

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)
Результат Elastica\Response Response object

set() публичный Метод

Set settings for cluster.
public set ( array $settings ) : Response
$settings array Raw settings (including persistent or transient)
Результат Elastica\Response

setPersistent() публичный Метод

Sets persistent setting.
public setPersistent ( string $key, string $value ) : Response
$key string
$value string
Результат Elastica\Response

setReadOnly() публичный Метод

Second param can be used to set it persistent
public setReadOnly ( boolean $readOnly = true, boolean $persistent = false ) : Response
$readOnly boolean
$persistent boolean
Результат Elastica\Response $response

setTransient() публичный Метод

Sets transient settings.
public setTransient ( string $key, string $value ) : Response
$key string
$value string
Результат Elastica\Response

Описание свойств

$_client защищенное свойство

Client object
protected $_client