Elastica\Cluster::getState PHP Méthode

getState() public méthode

Returns the full state of the cluster.
public getState ( ) : array
Résultat array State array
    public function getState()
    {
        return $this->_data;
    }

Usage Example

Exemple #1
0
 /**
  * Returns all index settings
  *
  * @return array Index settings
  */
 public function getSettings()
 {
     // TODO Update as soon as new API is implemented
     $cluster = new Cluster($this->_index->getClient());
     $state = $cluster->getState();
     return $state['metadata']['indices'][$this->_index->getName()]['settings'];
 }