RemoteNamespace.php 822 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Elasticsearch\Namespaces;
  3. use Elasticsearch\Endpoints\Remote\Info;
  4. /**
  5. * Class RemoteNamespace
  6. *
  7. * @category Elasticsearch
  8. * @package Elasticsearch\Namespaces\TasksNamespace
  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 RemoteNamespace extends AbstractNamespace
  14. {
  15. /**
  16. * @param $params array Associative array of parameters
  17. *
  18. * @return array
  19. */
  20. public function info($params = array())
  21. {
  22. /** @var callback $endpointBuilder */
  23. $endpointBuilder = $this->endpoints;
  24. /** @var Info $endpoint */
  25. $endpoint = $endpointBuilder('Remote\Info');
  26. $endpoint->setParams($params);
  27. return $this->performRequest($endpoint);
  28. }
  29. }