summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Node/Stats.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Node/Stats.php')
-rw-r--r--vendor/ruflin/elastica/lib/Elastica/Node/Stats.php30
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']);