Recovery.php 936 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Elasticsearch\Endpoints\Indices;
  3. use Elasticsearch\Endpoints\AbstractEndpoint;
  4. /**
  5. * Class Recovery
  6. *
  7. * @category Elasticsearch
  8. * @package Elasticsearch\Endpoints\Indices
  9. * @author Zachary Tong <zach@elastic.co>
  10. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
  11. * @link http://elastic.co
  12. */
  13. class Recovery extends AbstractEndpoint
  14. {
  15. /**
  16. * @return string
  17. */
  18. public function getURI()
  19. {
  20. $index = $this->index;
  21. $uri = "/_recovery";
  22. if (isset($index) === true) {
  23. $uri = "/$index/_recovery";
  24. }
  25. return $uri;
  26. }
  27. /**
  28. * @return string[]
  29. */
  30. public function getParamWhitelist()
  31. {
  32. return array(
  33. 'detailed',
  34. 'active_only',
  35. 'human'
  36. );
  37. }
  38. /**
  39. * @return string
  40. */
  41. public function getMethod()
  42. {
  43. return 'GET';
  44. }
  45. }