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/Cluster | |
parent | 15e69f7b20b6596b9148030acce5b59993b95a45 (diff) | |
parent | 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff) |
Merge branch 'mw-1.26'
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Cluster')
4 files changed, 54 insertions, 63 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Cluster/Health.php b/vendor/ruflin/elastica/lib/Elastica/Cluster/Health.php index 18c77cfc..d5d25ff1 100644 --- a/vendor/ruflin/elastica/lib/Elastica/Cluster/Health.php +++ b/vendor/ruflin/elastica/lib/Elastica/Cluster/Health.php @@ -1,6 +1,6 @@ <?php - namespace Elastica\Cluster; + use Elastica\Client; use Elastica\Cluster\Health\Index; use Elastica\Request; @@ -8,23 +8,19 @@ use Elastica\Request; /** * Elastic cluster health. * - * @package Elastica * @author Ray Ward <ray.ward@bigcommerce.com> - * @link http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html */ class Health { /** - * Elastica client. - * - * @var \Elastica\Client Client object + * @var \Elastica\Client Client object. */ protected $_client = null; /** - * The cluster health data. - * - * @var array + * @var array The cluster health data. */ protected $_data = null; @@ -63,7 +59,7 @@ class Health /** * Refreshes the health data for the cluster. * - * @return \Elastica\Cluster\Health + * @return $this */ public function refresh() { diff --git a/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Index.php b/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Index.php index c39e94c3..ef55bd00 100644 --- a/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Index.php +++ b/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Index.php @@ -1,27 +1,22 @@ <?php - namespace Elastica\Cluster\Health; /** * Wraps status information for an index. * - * @package Elastica * @author Ray Ward <ray.ward@bigcommerce.com> - * @link http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html */ class Index { /** - * The name of the index. - * - * @var string + * @var string The name of the index. */ protected $_name; /** - * The index health data. - * - * @var array + * @var array The index health data. */ protected $_data; diff --git a/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Shard.php b/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Shard.php index a5da08ae..e1d2c8dc 100644 --- a/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Shard.php +++ b/vendor/ruflin/elastica/lib/Elastica/Cluster/Health/Shard.php @@ -1,27 +1,22 @@ <?php - namespace Elastica\Cluster\Health; /** * Wraps status information for a shard. * - * @package Elastica * @author Ray Ward <ray.ward@bigcommerce.com> - * @link http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html */ class Shard { /** - * The shard index/number. - * - * @var int + * @var int The shard index/number. */ protected $_shardNumber; /** - * The shard health data. - * - * @var array + * @var array The shard health data. */ protected $_data; diff --git a/vendor/ruflin/elastica/lib/Elastica/Cluster/Settings.php b/vendor/ruflin/elastica/lib/Elastica/Cluster/Settings.php index 8166dda3..c597417f 100644 --- a/vendor/ruflin/elastica/lib/Elastica/Cluster/Settings.php +++ b/vendor/ruflin/elastica/lib/Elastica/Cluster/Settings.php @@ -1,29 +1,25 @@ <?php - namespace Elastica\Cluster; use Elastica\Client; use Elastica\Request; /** - * Cluster settings + * Cluster settings. * - * @category Xodoa - * @package Elastica * @author Nicolas Ruflin <spam@ruflin.com> - * @link http://www.elasticsearch.org/guide/reference/api/admin-cluster-update-settings.html + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html */ class Settings { /** - * Client - * * @var \Elastica\Client Client object */ protected $_client = null; /** - * Creates a cluster object + * Creates a cluster object. * * @param \Elastica\Client $client Connection client object */ @@ -33,7 +29,7 @@ class Settings } /** - * Returns settings data + * Returns settings data. * * @return array Settings data (persistent and transient) */ @@ -43,11 +39,12 @@ class Settings } /** - * Returns the current persistent settings of the cluster + * Returns the current persistent settings of the cluster. * * If param is set, only specified setting is return. * - * @param string $setting OPTIONAL Setting name to return + * @param string $setting OPTIONAL Setting name to return + * * @return array|string|null Settings data */ public function getPersistent($setting = '') @@ -59,7 +56,7 @@ class Settings if (isset($settings[$setting])) { return $settings[$setting]; } else { - return null; + return; } } @@ -67,11 +64,12 @@ class Settings } /** - * Returns the current transient settings of the cluster + * Returns the current transient settings of the cluster. * * If param is set, only specified setting is return. * - * @param string $setting OPTIONAL Setting name to return + * @param string $setting OPTIONAL Setting name to return + * * @return array|string|null Settings data */ public function getTransient($setting = '') @@ -90,12 +88,14 @@ class Settings if (isset($settings[$key])) { $settings = $settings[$key]; } else { - return null; + return; } } + return $settings; } - return null; + + return; } } @@ -103,10 +103,11 @@ class Settings } /** - * Sets persistent setting + * Sets persistent setting. + * + * @param string $key + * @param string $value * - * @param string $key - * @param string $value * @return \Elastica\Response */ public function setPersistent($key, $value) @@ -114,17 +115,18 @@ class Settings return $this->set( array( 'persistent' => array( - $key => $value - ) + $key => $value, + ), ) ); } /** - * Sets transient settings + * Sets transient settings. + * + * @param string $key + * @param string $value * - * @param string $key - * @param string $value * @return \Elastica\Response */ public function setTransient($key, $value) @@ -132,19 +134,20 @@ class Settings return $this->set( array( 'transient' => array( - $key => $value - ) + $key => $value, + ), ) ); } /** - * Sets the cluster to read only + * Sets the cluster to read only. * * Second param can be used to set it persistent * - * @param bool $readOnly - * @param bool $persistent + * @param bool $readOnly + * @param bool $persistent + * * @return \Elastica\Response $response */ public function setReadOnly($readOnly = true, $persistent = false) @@ -161,9 +164,10 @@ class Settings } /** - * Set settings for cluster + * Set settings for cluster. + * + * @param array $settings Raw settings (including persistent or transient) * - * @param array $settings Raw settings (including persistent or transient) * @return \Elastica\Response */ public function set(array $settings) @@ -172,7 +176,7 @@ class Settings } /** - * Get the client + * Get the client. * * @return \Elastica\Client */ @@ -182,10 +186,11 @@ class Settings } /** - * Sends settings request + * Sends settings request. + * + * @param array $data OPTIONAL Data array + * @param string $method OPTIONAL Transfer method (default = \Elastica\Request::GET) * - * @param array $data OPTIONAL Data array - * @param string $method OPTIONAL Transfer method (default = \Elastica\Request::GET) * @return \Elastica\Response Response object */ public function request(array $data = array(), $method = Request::GET) |