PHP 클래스 Elastica\Cluster\Settings

파일 보기 프로젝트 열기: ruflin/elastica 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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