summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Facet/Filter.php
blob: ed6f28b778eed5c29f2896bbe4b1ad9ff7766b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

namespace Elastica\Facet;

use Elastica\Filter\AbstractFilter;

/**
 * Filter facet
 *
 * @category Xodoa
 * @package Elastica
 * @author Nicolas Ruflin <spam@ruflin.com>
 * @link http://www.elasticsearch.org/guide/reference/api/search/facets/filter-facet.html
 */
class Filter extends AbstractFacet
{
    /**
     * Set the filter for the facet.
     *
     * @param  \Elastica\Filter\AbstractFilter $filter
     * @return \Elastica\Facet\Filter
     */
    public function setFilter(AbstractFilter $filter)
    {
        return $this->_setFacetParam('filter', $filter->toArray());
    }
}