Elastica\Cluster::getNodes PHP Method

getNodes() public method

Returns all nodes of the cluster.
public getNodes ( ) : Node[]
return Node[]
    public function getNodes()
    {
        $nodes = [];
        $data = $this->getState();
        foreach ($data['nodes'] as $id => $name) {
            $nodes[] = new Node($id, $this->getClient());
        }
        return $nodes;
    }