@param float         $weight the weight of the function
@param AbstractQuery $filter a filter associated with this function

@return $this
970373
public function addWeightFunction(float $weight, AbstractQuery $filter = null): self
    {
        return $this->addFunction('weight', $weight, $filter);
    }
18969
public function addFilter($filter)
    {
        if (!($filter instanceof FilterInterface) && !is_callable($filter)) {
            $filter = FilterHelper::create($filter);
        }

        $this->filter->addFilter($filter);

        return $this;
    }
1363592
public function filter($filter) {
		if (!in_array($filter, array(self::FILTER_NEGATE, self::FILTER_GRAYSCALE)))
			return false;
		imagefilter($this->resource, $filter);
		return $this;
	}
709558
protected function processFilter(\Zend_Controller_Request_Abstract $request, array $filter)
    {
        $defaults = $this->getDefaultSearchData();

        $this->dateFactor = $this->processFilterName(self::DATE_FACTOR, $request, $filter, $defaults);
        $this->dateGroup  = $this->processFilterName(self::DATE_GROUP, $request, $filter, $defaults);
        $this->dateType   = $this->processFilterName(self::DATE_TYPE, $request, $filter, $defaults);

        unset($filter[self::DATE_FACTOR], $filter[self::DATE_GROUP], $filter[self::DATE_TYPE]);

        $model = $this->getModel();

        return $filter;
    }
66693
public function installFilter($filter)
    {
        if (!is_callable($filter)) {
            $f = function () { return true; };
            $filter = $this->wrap($f, $filter);
        }

        $this->filter = $filter;

        return $this;
    }
806718
public function insert($filter, $priority)
	{
		if ( ! $filter instanceof FilterInterface)
		{
			throw new \InvalidArgumentException('The filter must be an instance of FilterInterface.');
		}
		
		if ($filter instanceof FilterChainInterface)
		{
			parent::insert($filter, [-$priority, $this->serial--]);
		}
		else
		{
			if ($this->isEmpty())
			{
				parent::insert(new FilterChain(), [0, $this->serial--]);
			}
			
			$this->top()->addFilter($filter, $priority);
		}
		
		return $this;
	}
786550
public function removeFilter($filter) {
		foreach ($this->filters as $key => $value) {
			if ($value['filter'] == $filter) {
				unset($this->filters[$key]);
			}
		}

		return $this;
	}
1233216
public function where($filter, $value = null)
    {
        foreach ($this->queries as $query) {
            $query->where($filter, $value);
        }

        return $this;
    }
782081
private function search(AbstractFilter $filter)
    {
        if ($this->ldapSearchOptions) {
            $ldapResource = $this->ldap->getResource();
            foreach ($this->ldapSearchOptions as $name => $options) {
                ldap_set_option($ldapResource, $name, $options);
            }
        }

        return $this->ldap->searchEntries($filter, null, Ldap::SEARCH_SCOPE_SUB, $this->entryAttributesToFetch);
    }
575961
public function setFilter($filter)
    {
        parent::setFilter($filter);

        $this->userOptions['value'] = $this->getOption('value') === '' ? null : $this->getOption('value');
    }
411599
public function addFilter(FilterInterface $filter) {
        if ($filter->supportsType($this->getType())) {
            $this->filters[] = $filter;
        }
        return $this;
    }
132999
public function addScriptScoreFunction(AbstractScript $script, AbstractQuery $filter = null, float $weight = null)
    {
        return $this->addFunction('script_score', $script, $filter, $weight);
    }
360543
public function setFilters($filters = [])
    {
        foreach ($filters as $key => $value) {
            $this->addFilter($key, $value);
        }

        return $this;
    }
633565
public function setFromColumn(Column\AbstractColumn $column, $inputFilterValue)
    {
        $this->column = $column;
        $this->setColumnOperator($inputFilterValue, $column->getFilterDefaultOperation());
    }
851785
public function setFilters($filters = []) {
		if ($filters) {
			foreach ($filters as $key => $value) {
				$this->setFilter($key, $value);
			}
		}

		return $this;
	}
729107
public function setFilters(array $filters): AbstractRepository
    {
        foreach ($filters as $f => $v) {
            $this->filterBy($f, $v);
        }

        return $this;
    }
1160288
public function load($array, $filter=false)
    {
        // apply the optional filter
        if (is_array($filter)) {
            $array = array_intersect_key($array, array_fill_keys($filter, NULL));
        }

        foreach ($array as $key=>$value) {
            if(is_object($value) || is_array($value))
                $this->$key = $value;
            else
                $this->__set($key, $value);
        }

        return $this;
    }