1<?php
2
3namespace Elastica\Query;
4
5/**
6 * SpanContaining query.
7 *
8 * @author Alessandro Chitolina <alekitto@gmail.com>
9 *
10 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-span-containing-query.html
11 */
12class SpanContaining extends AbstractSpanQuery
13{
14    public function __construct(?AbstractSpanQuery $little = null, ?AbstractSpanQuery $big = null)
15    {
16        if (null !== $little) {
17            $this->setLittle($little);
18        }
19
20        if (null !== $big) {
21            $this->setBig($big);
22        }
23    }
24
25    /**
26     * @return $this
27     */
28    public function setLittle(AbstractSpanQuery $little): self
29    {
30        return $this->setParam('little', $little);
31    }
32
33    /**
34     * @return $this
35     */
36    public function setBig(AbstractSpanQuery $big): self
37    {
38        return $this->setParam('big', $big);
39    }
40}
41