execute the filter on a value
@param mixed $value
@return mixed
972272
public function filter($value) {
        mb_internal_encoding("UTF-8");
        mb_regex_encoding("UTF-8");

        $pattern = '[^'.preg_quote($this->options["characters"]).']';

        return mb_ereg_replace($pattern, "", $value);
    }
178396
public function filter($value)
    {
        if (is_int($value)) {
            return (string) $value;
        }
        if (! (is_float($value) || is_string($value))) {
            return $value;
        }
        $value = (string) $value;

        if (!StringUtils::hasPcreUnicodeSupport()) {
            // POSIX named classes are not supported, use alternative 0-9 match
            $pattern = '/[^0-9]/';
        } elseif (extension_loaded('mbstring')) {
            // Filter for the value with mbstring
            $pattern = '/[^[:digit:]]/';
        } else {
            // Filter for the value without mbstring
            $pattern = '/[\p{^N}]/';
        }

        return preg_replace($pattern, '', $value);
    }
1154166
public function findByApiKey( $value )
    {

        $apiOptions = $this->__get('apiOptions');

        if( !isset( $apiOptions['findByKey'] ) ) {
            return $this->find( $value, true );
        }

        $property = $apiOptions['findByKey'];

        $filter = $this->getFindFilterFactory()
            ->get( $property, null, $value );

        return $this->findByFilterComponents(
            FindFilterComponentFactory::FIND_ONE,
            array( $property => $filter ),
            self::ALL
        );

    }
1073419
public function filter($value)
    {
        $values = explode(' ', $value);

        foreach ($values as &$val) {
            if (substr($val, -1) === '/') {
                $val = substr($val, 0, -1);
            }
        }

        return implode(' ', $values);
    }
28057
private function filter(string $value) : string
    {
        foreach ($this->filters as $filter) {
            $value = $filter($value);
        }

        return $value;
    }
407307
public function filter($value)
    {
        $chars = ' ';
        if ($this->getExtras()) {
            $chars .= $this->getExtras();
        }
        return trim($value, $chars);
    }
1211597
public function sanitize($value)
    {
        foreach($this->_queue as $filter) {
            $value = $filter->sanitize($value);
        }

        return $value;
    }
288669
public function filter($value)
    {
        /** @var InputFilterInterface $filter */
        foreach ($this->filters as $filter) {
            if (true === is_array($value)) {
                $values = array();
                foreach ($value as $child) {
                    if (null !== $filtered = $filter->filter($child)) {
                        $values[] = $filtered;
                    }
                }
                $value = $values;
            } else {
                $value = $filter->filter($value);
            }
        }

        return $value;
    }
926189
public function executeFilter($eventName, $value = null)
    {
        return $this->executeItems(self::FILTER, $eventName, $value);
    }
1273965
public function filter($value)
    {
        if (!is_scalar($value)) {
            return $value;
        }
        $value = (string) $value;

        $defaultScheme = $this->defaultScheme ?: $this->enforcedScheme;

        // Reset default scheme if it is not a known scheme
        if (!UriFactory::getRegisteredSchemeClass($defaultScheme)) {
            $defaultScheme = null;
        }

        try {
            $uri = UriFactory::factory($value, $defaultScheme);
            if ($this->enforcedScheme && (!$uri->getScheme())) {
                $this->enforceScheme($uri);
            }
        } catch (UriException $ex) {
            // We are unable to parse / enfore scheme with the given config and input
            return $value;
        }

        $uri->normalize();

        if (!$uri->isValid()) {
            return $value;
        }

        return $uri->toString();
    }
312002
public function filter($value)
    {
        if (!is_string($value)) {
            return $value;
        }

        // Strip unicode bombs, and make sure all newlines are UNIX newlines.
        $value = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $value);

        return preg_replace('{\r\n?}', '', $value);
    }
347215
public function filter($value)
    {
        $params = (array) $this->options['callback_params'];
        array_unshift($params, $value);

        return call_user_func_array($this->options['callback'], $params);
    }
1030617
public function filter($name, $value = null)
    {
        if (is_array($name)) {
            $this->option['filter'] = $name;
        } else {
            $this->option['filter'][$name] = $value;
        }

        return $this;
    }
1247004
public function filter($value)
    {
        if ($value instanceof VisibilityInterface
            && !$this->builder->isVisibilityAllowed($value->getVisibility())
        ) {
            return null;
        }

        return $value;
    }
252131
public function filter($value)
    {
        if ($this->toEncoding === null) {
            return $value;
        }

        if ($this->fromEncoding === null) {
            return mb_convert_encoding($value, $this->toEncoding);
        }

        return mb_convert_encoding($value, $this->toEncoding, $this->fromEncoding);
    }
1270940
protected function applyFilters($value)
    {
        foreach ($this->filters as $filter) {
            if (is_array($value) && !empty($filter['recursive'])) {
                array_walk_recursive($value, 
                    array('HTML_QuickForm2_Node', 'applyFilter'), $filter);
            } else {
                self::applyFilter($value, null, $filter);
            }
        }
        return $value;
    }
347486
public function filter($value)
    {
        if ($this->encodingFormat !== null) {
            return mb_strtolower($value, $this->encodingFormat);
        }

        return mb_strtolower($value);
    }