PHP Class Elastica\Node

Author: Nicolas Ruflin ([email protected])
Mostra file Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_client Client Client.
$_id Unique node id
$_info Node info.
$_name Node name.
$_stats Node stats.

Public Methods

Method Description
__construct ( string $id, Client $client ) Create a new node object.
getClient ( ) : Client Returns the current client object.
getId ( ) : string
getInfo ( ) : Info Return info object of the current node.
getName ( ) : string Get the name of the node.
getStats ( ) : Stats Return stats object of the current node.
refresh ( ) Refreshes all node information.
setId ( string $id )

Method Details

__construct() public method

Create a new node object.
public __construct ( string $id, Client $client )
$id string Node id or name
$client Client Node object

getClient() public method

Returns the current client object.
public getClient ( ) : Client
return Client Client

getId() public method

public getId ( ) : string
return string Unique node id. Can also be name if id not exists.

getInfo() public method

Return info object of the current node.
public getInfo ( ) : Info
return Elastica\Node\Info Node info object

getName() public method

Get the name of the node.
public getName ( ) : string
return string Node name

getStats() public method

Return stats object of the current node.
public getStats ( ) : Stats
return Elastica\Node\Stats Node stats

refresh() public method

This should be called after updating a node to refresh all information
public refresh ( )

setId() public method

public setId ( string $id )
$id string Node id

Property Details

$_client protected_oe property

Client.
protected Client,Elastica $_client
return Client

$_id protected_oe property

Unique node id
protected $_id

$_info protected_oe property

Node info.
protected $_info

$_name protected_oe property

Node name.
protected $_name

$_stats protected_oe property

Node stats.
protected $_stats