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