Sets sanitization filter

@param int $filter
16602
public function setSanitizeFilter($filter) {
        $this->filterName = $this->findFilter($filter);        
        $this->sanitizeFilter = $filter;
    }
374058
private function sanitizeFilters(array $filters): array
    {
        $sanitized = array_filter($filters, function (string $name): bool {
            return isset($this->loaders[$name]);
        }, ARRAY_FILTER_USE_KEY);

        if (\count($filters) !== \count($sanitized)) {
            throw new \InvalidArgumentException(sprintf('Could not find filter(s): %s', implode(', ', array_map(function (string $name): string {
                return sprintf('"%s"', $name);
            }, array_diff(array_keys($filters), array_keys($sanitized))))));
        }

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

        $this->filter = $filter;

        return $this;
    }
1041358
public function setFilters(array $filters = [])
    {
        foreach ($filters as $filterName => $filterValue) {
            $this->addFilter($filterName, $filterValue);
        }

        return $this;
    }
927114
public function setFilters(array $filters)
    {
        foreach ($filters as $filter) {
            if (! $filter instanceof Filter) {
                throw new InvalidArgumentException('Filter have to be an instanceof ZfcDatagrid\Filter');
            }
        }

        $this->filters = $filters;
    }
479858
public function setIteratorFilter($mask = 0, $filter = null)
    {
        $this->_filter = array();

        if ($mask) {
            $this->_filter['mask'] = $mask;
        }

        if (!is_null($filter)) {
            $rfc822 = new Horde_Mail_Rfc822();
            $this->_filter['filter'] = $rfc822->parseAddressList($filter);
        }
    }
525814
public function setFilter(\Sulu\Bundle\ResourceBundle\Entity\Filter $filter)
    {
        $this->filter = $filter;

        return $this;
    }
373609
public function setFilter($filter)
    {
        if (!in_array($filter, $this->allowedFilters)) {
            throw new \Zend_Validate_Exception('Invalid param filter.');
        }

        $this->filter = (int) $filter;
        return $this;
    }
546437
public function validateFilter($filter)
    {
        // Match a regex pattern instead of just exploding on '-' (this fail with negative numbers).
        $regexp = "/(-?[0-9]+)-(-?[0-9]+)/";
        preg_match_all($regexp, $filter, $matches);

        // Whole match + two groups matches.
        if (count($matches) !== 3) {
            return false;
        }

        $filter = [current($matches[1]), current($matches[2])];

        // Legacy check for >=0 is also removed here.
        foreach ($filter as $v) {
            if (is_infinite((double) $v)) {
                return false;
            }
        }

        return $filter;
    }
731620
public function withFilter($filter) {
        if (!in_array($filter, [self::ALL, self::ANY, self::SOME, self::EXISTS, self::NOT_EXISTS, self::IN, self::NOT_IN], true)) {
            throw new InvalidArgumentException('Invalid filter type for sub-query');
        }

        $this->_filter = $filter;

        return $this;
    }
375754
public function setFilter($filter)
    {
        $validFilters = self::NO_FILTER |
                self::FILTER_NONE | self::FILTER_SUB |
                self::FILTER_UP | self::FILTER_AVG |
                self::FILTER_PAETH | self::ALL_FILTERS;

        $filter = $filter & $validFilters;

        $this->filter = (integer) $filter;

        return $this;
    }
1154389
protected function prepareFilter(array $filter)
    {
        foreach ($filter as $code => &$value) {
            if ($code === 'id') {
                intval($value);

                if ($value <= 0) {
                    throw new ArgumentNullException($code);
                }
            } elseif ($code === 'base') {

                if (!is_bool($value)) {
                    throw new ArgumentNullException($code);
                }

            } else {
                trim(htmlspecialchars($value));

                if (strlen($value) <= 0) {
                    throw new ArgumentNullException($code);
                }
            }
        }

        return $filter;
    }
286655
protected function setFilter($filter, AssetInterface $asset)
    {
        if (is_null($filter)) {
            return;
        }

        if (!empty($filter['filter'])) {
            $this->ensureByFilter($asset, $filter['filter']);

            return;
        }

        if (!empty($filter['service'])) {
            $this->ensureByService($asset, $filter['service']);

            return;
        }

        throw new Exception\RuntimeException(
            'Invalid filter supplied. Expected Filter or Service.'
        );
    }
331514
public function set($filters)
    {
        $filters = (array) $filters;

        foreach ($this->map as $attribute => $key) {
            if (!isset($filters[$attribute])) {
                continue;
            }

            $value = $filters[$attribute];
            $this->setByKey($key, $value);
        }
    }
704870
public static function setBlacklist($filter) {
        if ($filter & self::PHPDOC)
            self::$blacklist = array_merge(self::$blacklist, self::$phpdoc);
    }
861134
public function sanitize()
    {
        $this->sanitizer = \Sanitizer::make($this->input(), $this->filters());
        $this->replace($this->sanitizer->sanitize());
    }
360543
public function setFilters($filters = [])
    {
        foreach ($filters as $key => $value) {
            $this->addFilter($key, $value);
        }

        return $this;
    }