-
Notifications
You must be signed in to change notification settings - Fork 980
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7148f9e
commit 3b041f8
Showing
105 changed files
with
1,121 additions
and
970 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,19 +5,19 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Aliases | ||
* Class Aliases. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class Aliases extends AbstractEndpoint | ||
{ | ||
// A comma-separated list of alias names to return | ||
private $name; | ||
|
||
/** | ||
* @param $name | ||
* | ||
|
@@ -28,7 +28,9 @@ public function setName($name) | |
if (isset($name) !== true) { | ||
return $this; | ||
} | ||
|
||
if (is_array($name) === true) { | ||
$name = implode(',', $name); | ||
} | ||
$this->name = $name; | ||
|
||
return $this; | ||
|
@@ -40,8 +42,7 @@ public function setName($name) | |
protected function getURI() | ||
{ | ||
$name = $this->name; | ||
$uri = "/_cat/aliases"; | ||
|
||
$uri = '/_cat/aliases'; | ||
if (isset($name) === true) { | ||
$uri = "/_cat/aliases/$name"; | ||
} | ||
|
@@ -55,6 +56,7 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'local', | ||
'master_timeout', | ||
'h', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,19 +5,19 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Allocation | ||
* Class Allocation. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class Allocation extends AbstractEndpoint | ||
{ | ||
// A comma-separated list of node IDs or names to limit the returned information | ||
private $node_id; | ||
|
||
/** | ||
* @param $node_id | ||
* | ||
|
@@ -28,7 +28,9 @@ public function setNodeId($node_id) | |
if (isset($node_id) !== true) { | ||
return $this; | ||
} | ||
|
||
if (is_array($node_id) === true) { | ||
$node_id = implode(',', $node_id); | ||
} | ||
$this->node_id = $node_id; | ||
|
||
return $this; | ||
|
@@ -40,8 +42,7 @@ public function setNodeId($node_id) | |
protected function getURI() | ||
{ | ||
$node_id = $this->node_id; | ||
$uri = "/_cat/allocation"; | ||
|
||
$uri = '/_cat/allocation'; | ||
if (isset($node_id) === true) { | ||
$uri = "/_cat/allocation/$node_id"; | ||
} | ||
|
@@ -55,6 +56,7 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'bytes', | ||
'local', | ||
'master_timeout', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,13 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Count | ||
* Class Count. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class Count extends AbstractEndpoint | ||
|
@@ -21,8 +22,7 @@ class Count extends AbstractEndpoint | |
protected function getURI() | ||
{ | ||
$index = $this->index; | ||
$uri = "/_cat/count"; | ||
|
||
$uri = '/_cat/count'; | ||
if (isset($index) === true) { | ||
$uri = "/_cat/count/$index"; | ||
} | ||
|
@@ -36,6 +36,7 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'local', | ||
'master_timeout', | ||
'h', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,18 +5,19 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Fielddata | ||
* Class Fielddata. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class Fielddata extends AbstractEndpoint | ||
{ | ||
// A comma-separated list of fields to return the fielddata size | ||
private $fields; | ||
|
||
/** | ||
* @param $fields | ||
* | ||
|
@@ -27,7 +28,9 @@ public function setFields($fields) | |
if (isset($fields) !== true) { | ||
return $this; | ||
} | ||
|
||
if (is_array($fields) === true) { | ||
$fields = implode(',', $fields); | ||
} | ||
$this->fields = $fields; | ||
|
||
return $this; | ||
|
@@ -39,8 +42,7 @@ public function setFields($fields) | |
protected function getURI() | ||
{ | ||
$fields = $this->fields; | ||
$uri = "/_cat/fielddata"; | ||
|
||
$uri = '/_cat/fielddata'; | ||
if (isset($fields) === true) { | ||
$uri = "/_cat/fielddata/$fields"; | ||
} | ||
|
@@ -54,11 +56,14 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'bytes', | ||
'local', | ||
'master_timeout', | ||
'h', | ||
'help', | ||
'v', | ||
'fields', | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,13 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Health | ||
* Class Health. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class Health extends AbstractEndpoint | ||
|
@@ -20,7 +21,7 @@ class Health extends AbstractEndpoint | |
*/ | ||
protected function getURI() | ||
{ | ||
$uri = "/_cat/health"; | ||
$uri = '/_cat/health'; | ||
|
||
return $uri; | ||
} | ||
|
@@ -31,6 +32,7 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'local', | ||
'master_timeout', | ||
'h', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,13 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Help | ||
* Class Help. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class Help extends AbstractEndpoint | ||
|
@@ -20,7 +21,7 @@ class Help extends AbstractEndpoint | |
*/ | ||
protected function getURI() | ||
{ | ||
$uri = "/_cat"; | ||
$uri = '/_cat'; | ||
|
||
return $uri; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,15 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Indices | ||
* Class Indices. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
|
||
class Indices extends AbstractEndpoint | ||
{ | ||
/** | ||
|
@@ -22,8 +22,7 @@ class Indices extends AbstractEndpoint | |
protected function getURI() | ||
{ | ||
$index = $this->index; | ||
$uri = "/_cat/indices"; | ||
|
||
$uri = '/_cat/indices'; | ||
if (isset($index) === true) { | ||
$uri = "/_cat/indices/$index"; | ||
} | ||
|
@@ -37,6 +36,7 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'bytes', | ||
'local', | ||
'master_timeout', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,13 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Master | ||
* Class Master. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class Master extends AbstractEndpoint | ||
|
@@ -20,7 +21,7 @@ class Master extends AbstractEndpoint | |
*/ | ||
protected function getURI() | ||
{ | ||
$uri = "/_cat/master"; | ||
$uri = '/_cat/master'; | ||
|
||
return $uri; | ||
} | ||
|
@@ -31,6 +32,7 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'local', | ||
'master_timeout', | ||
'h', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,23 @@ | |
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class NodeAttrs | ||
* Class Nodeattrs. | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cat | ||
* | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* | ||
* @link http://elastic.co | ||
*/ | ||
class NodeAttrs extends AbstractEndpoint | ||
class Nodeattrs extends AbstractEndpoint | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
protected function getURI() | ||
{ | ||
$uri = "/_cat/nodeattrs"; | ||
$uri = '/_cat/nodeattrs'; | ||
|
||
return $uri; | ||
} | ||
|
@@ -31,6 +32,7 @@ protected function getURI() | |
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
'format', | ||
'local', | ||
'master_timeout', | ||
'h', | ||
|
Oops, something went wrong.