Seal.php 943 B

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