Adds an applied filter

@param mixed $key
@param mixed $value
@param bool $allowmultiple
512461
protected function add_filter($key, $value, $allowmultiple = false) {
        if ($allowmultiple || empty($this->get_filter_values($key))) {
            $this->filtersapplied[] = [$key, $value];
        }
    }
623779
public static function addFilter(array $filters, array $filterArray, string $key, string $name): array
    {
        if (isset($filterArray[$name][$key])) {
            unset($filterArray[$name][$key]);
        }
        if (sizeof($filterArray[$name]) > 0) {
            $filters['filter']['bool']['must'][] = $filterArray;
        }

        return $filters;
    }
1204130
protected function addParam($key, $value = null)
	{
		if (is_null($value))
		{
			$this->params[] = $key;
		}
		else
		{
			$this->params[$key] = $value;
		}

	}
506628
public function where($key, $value)
    {
        $filter = $this->createFilter($key, $value);
        return new static(array_filter($this->source, $filter));
    }
1036193
public function getFilter($key, $value = null)
    {
        if (!$this->expr instanceof ExpressionBuilder) {
            throw new QueryParseException('Cannot call method without an Expression Builder parameter set', 1);
        }

        /** @var callable $callback */
        foreach ($this->filterHandlers as $callback) {
            $result = $callback($key, $value, $this->expr);
            if ($result instanceof Filter) {
                return $result;
            }
        }

        return null;
    }
220797
public function addMultiple($filterArray)
    {
        foreach($filterArray as $key => $value) {
            if (!$this->hasWithName($key)) {
                $this->add($value, $key);
            }
        }

        return $this;
    }
659397
protected function validateParameter($key, $value)
    {
        if ($this->isSafeValue($value)) {
            return true;
        }

        $this->enforceNonObjectValue($key, $value);
        $this->enforceMultidimensionalArrayOfScalars($key, $value);

        return true;
    }
529420
public function addFilter($key, $filter)
    {
        if (false === isset($this->filters[$key])) {
            $this->filters[$key] = [];
        }

        $this->filters[$key][] = $filter;

        return $this;
    }
17471
private function processFilterParams($key, $param)
    {
        $this->filter[] = [
            $key,
            '=',
            (is_numeric($param)) ? (float) $param : $param
        ];
    }
1165377
public function match($key, $value, $bool, $filter = false, array $params = []) {
        if (is_array($key)) {
            return $this->multiMatch($key, $value, $bool, $filter, $params);
        }
        if (is_array($value)) {
            return $this->matches($key, $value, $bool, $filter, $params);
        }
        $this->addBool($this->makeFilteredQuery(["match" => [$key => ["query" => $value] + $params]], $filter), $bool, $filter);
        return $this;
    }
821130
public function addQueryParameter($key, $value, $override = true)
    {
        if (!isset($this->queryParameters[$key]) || true === $override) {
            $this->queryParameters[$key] = $value;
            return true;
        }

        return false;
    }
1248628
public function set($key, $value = null, $filter = null)
	{
		is_null($filter) and $filter = $this->_auto_filter;
		$this->_view->set($key, $value, $filter);

		return $this;
	}
137478
public function addFilter(string $name, $value): void
    {
        $this->filter[$name] = $value;
        $this->updateUriQuery();
    }
843671
private function filterLocations($value, $key) {
    if (!empty($this->locations) && in_array($key, $this->locations)) {
      return $value;
    }
    return FALSE;
  }
216468
@Bind(aggregate = true, optional = true)
    public void bindFilter(Filter filter) {
        filters.add(filter);
    }
369688
public function hasFilter($key, $value=null)
    {
        $this->parseInputOnce();

        if (!array_key_exists($key, $this->filters)) {
            return false;
        }

        if (func_num_args() < 2) {
            return true;
        }

        return $this->filterWouldMatch($this->filters[$key], $value, $key);
    }
455854
private static function validateBool($key, $value)
    {
        $value = filter_var($value, FILTER_VALIDATE_BOOLEAN, [
            'flags' => FILTER_NULL_ON_FAILURE,
        ]);
        if ($value === null) {
            throw new \InvalidArgumentException("Option[$key] must be boolean.");
        }
        return $value;
    }