diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
commit | a2190ac74dd4d7080b12bab90e552d7aa81209ef (patch) | |
tree | 8b31f38de9882d18df54cf8d9e0de74167a094eb /vendor/ruflin/elastica/lib/Elastica/Node/Stats.php | |
parent | 15e69f7b20b6596b9148030acce5b59993b95a45 (diff) | |
parent | 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff) |
Merge branch 'mw-1.26'
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Node/Stats.php')
-rw-r--r-- | vendor/ruflin/elastica/lib/Elastica/Node/Stats.php | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Node/Stats.php b/vendor/ruflin/elastica/lib/Elastica/Node/Stats.php index d918e686..1af94b07 100644 --- a/vendor/ruflin/elastica/lib/Elastica/Node/Stats.php +++ b/vendor/ruflin/elastica/lib/Elastica/Node/Stats.php @@ -1,43 +1,41 @@ <?php - namespace Elastica\Node; use Elastica\Node as BaseNode; use Elastica\Request; /** - * Elastica cluster node object + * Elastica cluster node object. * - * @category Xodoa - * @package Elastica * @author Nicolas Ruflin <spam@ruflin.com> - * @link http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-status.html */ class Stats { /** - * Response + * Response. * * @var \Elastica\Response Response object */ protected $_response = null; /** - * Stats data + * Stats data. * * @var array stats data */ protected $_data = array(); /** - * Node + * Node. * * @var \Elastica\Node Node object */ protected $_node = null; /** - * Create new stats for node + * Create new stats for node. * * @param \Elastica\Node $node Elastica node object */ @@ -48,7 +46,7 @@ class Stats } /** - * Returns all node stats as array based on the arguments + * Returns all node stats as array based on the arguments. * * Several arguments can be use * get('index', 'test', 'example') @@ -63,7 +61,7 @@ class Stats if (isset($data[$arg])) { $data = $data[$arg]; } else { - return null; + return; } } @@ -71,7 +69,7 @@ class Stats } /** - * Returns all stats data + * Returns all stats data. * * @return array Data array */ @@ -81,7 +79,7 @@ class Stats } /** - * Returns node object + * Returns node object. * * @return \Elastica\Node Node object */ @@ -91,7 +89,7 @@ class Stats } /** - * Returns response object + * Returns response object. * * @return \Elastica\Response Response object */ @@ -101,13 +99,13 @@ class Stats } /** - * Reloads all nodes information. Has to be called if informations changed + * Reloads all nodes information. Has to be called if informations changed. * * @return \Elastica\Response Response object */ public function refresh() { - $path = '_nodes/' . $this->getNode()->getName() . '/stats'; + $path = '_nodes/'.$this->getNode()->getName().'/stats'; $this->_response = $this->getNode()->getClient()->request($path, Request::GET); $data = $this->getResponse()->getData(); $this->_data = reset($data['nodes']); |