sngrl\SphinxSearch\SphinxSearch::filter PHP Method

filter() public method

public filter ( $attribute, $values, $exclude = false )
    public function filter($attribute, $values, $exclude = false)
    {
        if (is_array($values)) {
            $val = array();
            foreach ($values as $v) {
                $val[] = (int) $v;
            }
        } else {
            $val = array((int) $values);
        }
        $this->_connection->setFilter($attribute, $val, $exclude);
        return $this;
    }