DotExpander.php 576 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Elastica\Processor;
  3. /**
  4. * Elastica Rename Processor.
  5. *
  6. * @author Federico Panini <fpanini@gmail.com>
  7. *
  8. * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/dot-expand-processor.html
  9. */
  10. class DotExpander extends AbstractProcessor
  11. {
  12. public function __construct(string $field)
  13. {
  14. $this->setField($field);
  15. }
  16. /**
  17. * Set the field.
  18. *
  19. * @param string $field
  20. *
  21. * @return $this
  22. */
  23. public function setField(string $field)
  24. {
  25. return $this->setParam('field', $field);
  26. }
  27. }