src/Query/Algolia/SearchQuery.php
public function withNumericFilter($name, $values, $logicalOperator = 'and')
    {
        if (!is_array($values)) {
            $values = [$values];
        }

        $numericalFilterArray = array_map(function ($value) use ($name) {
            return "{$name}={$value}";
        }, $values);

        $numericalFilter = implode(',', $numericalFilterArray);

        if ($logicalOperator == self::LOGICAL_OPERATOR_OR) {
            $numericalFilter = "({$numericalFilter})";
        }

        $this->numericFilters[] = $numericalFilter;

        return $this;
    }
public function withNumericFilter($name, $values, $logicalOperator = 'and')
    {
        if (!is_array($values)) {
            $values = [$values];
        }

        $numericalFilterArray = array_map(function ($value) use ($name) {
            return "{$name}={$value}";
        }, $values);

        $numericalFilter = implode(',', $numericalFilterArray);

        if ($logicalOperator == self::LOGICAL_OPERATOR_OR) {
            $numericalFilter = "({$numericalFilter})";
        }

        $this->numericFilters[] = $numericalFilter;

        return $this;
    }
public function withNumericFilter ( $ name , $ values , $ logicalOperator = 'and' ) { if ( ! is_array ( $ values ) ) { $ values = [ $ values ] ; } $ numericalFilterArray = array_map ( function ( $ value ) use ( $ name ) { return "{$name}={$value}" ; } , $ values ) ; $ numericalFilter = implode ( ',' , $ numericalFilterArray ) ; if ( $ logicalOperator == self :: LOGICAL_OPERATOR_OR ) { $ numericalFilter = "({$numericalFilter})" ; } $ this -> numericFilters [ ] = $ numericalFilter ; return $ this ; }
Set a numeric filter.

@param string       $name
@param string|array $values
@param string       $logicalOperator

@return $this
Set a numeric filter .