execute the filter on a value
@param mixed $value
@return mixed
490700
public function filter($value) {
        if($value === null)
            return null;

        try {
            $sourceDT = new DateTime($value);
            $targetTZ = new DateTimeZone($this->options["timezone"] ? $this->options["timezone"] : date_default_timezone_get());
            $targetDT = $sourceDT;
            $targetDT->setTimeZone($targetTZ);

            return $targetDT->format($this->options["format"]);
        }
        catch(Exception $e) {
            return false;
        }
    }
281018
public function filter($value)
    {
	    if (is_null($value))
		    return null;
	    else
            return (!is_int($value) && preg_match('#\s*[0-9]#',(string)$value))?((int) ((string) $value)):
	            ($value !== 0 && ((int) $value) === 0?null:((int) ((string) $value)));
    }
411069
public function filter($value)
    {
        if (!is_scalar($value)) {
            return $value;
        }
        $value = (string) $value;

        return (int) $value;
    }
431829
public function filter($value)
    {
        if ($value === null) {
            return $value;
        }

        if ($this->characters === null) {
            return trim($value);
        }

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

        return $this;
    }
451049
public function filter($value) {

        $testvalue = $this->options["insensitive"] ? strtolower($value): $value;

        // Value is not in enumeration
        if (!in_array($testvalue, $this->enumeration, $this->options["strict"]))
            return Filter::ERR_INVALID;

        $found = array_search($value, $this->enumeration, $this->options["strict"]);

        return $this->options["values"][$found];
    }
187766
public function filter($value)
    {
        return is_array($value) ? array_map(array($this, __FUNCTION__), $value) : stripslashes($value);
    }
410497
protected function filterValue($value, ?string $filter = null)
    {
        $resolver = $this->getFilterResolver($filter);

        if (\method_exists($resolver[0], $resolver[1])) {
            return $this->callFilterResolver($resolver, $value);
        }

        return $value;
    }
441068
public function filter($value)
    {
        try {
            $handlers = [
                self::CONSTRUCTION_DEPEND_PATTERN => [$this, 'dependDirective'],
                self::CONSTRUCTION_IF_PATTERN     => [$this, 'ifDirective'],
                self::CONSTRUCTION_PATTERN        => [$this, 'directiveLookup']
            ];
            foreach ($handlers as $pattern => $callback) {
                $value = preg_replace_callback($pattern, $callback, $value);
            }
        } catch (Exception $e) {
            $value = '';
            Mage::logException($e);
        }
        return $value;
    }
1343080
public function filter($value)
    {
        $filtered = null;
        if (!$this->validate($value, $filtered))
        {
            throw new \InvalidArgumentException(
                "Not a valid value for " . $this->__toString() . ": " . WF::str($value)
            );
        }

        return $filtered;
    }
1090130
public function filter($value)
    {
        if (!is_scalar($value) && !is_array($value)) {
            return $value;
        }

        if ($this->options['pattern'] === null) {
            throw new Exception\RuntimeException(sprintf(
                'Filter %s does not have a valid pattern set',
                get_class($this)
            ));
        }

        return preg_replace($this->options['pattern'], $this->options['replacement'], $value);
    }
629261
public function filter($value)
    {
	    if (is_string($value))
	        return new DateTime('@'.strtotime($value));
	    if ($value instanceof DateTime)
		    return $value;
	    if (is_int($value))
		    return new DateTime('@'.$value);
	    return null;
    }
630888
public function filter($value)
    {
        if (!is_string($value)) {
            return $value;
        }
        $value = (string) $value;

        if (null === $this->options['charlist']) {
            return $this->unicodeTrim($value);
        }

        return $this->unicodeTrim($value, $this->options['charlist']);
    }
679207
public function filter($value) {
        return $this->checkSanitizedValue(filter_var($value, $this->sanitizeFilter, $this->sanitizeFlags));
    }
226202
public function filter($value)
    {
        if (!is_scalar($value) && !is_array($value)) {
            return $value;
        }

        if ($this->separator === null) {
            throw new Exception\RuntimeException('You must provide a separator for this filter to work.');
        }

        $slugify = new BaseSlugify($this->options, $this->provider);

        $slugify->addRules($this->rules);

        return $slugify->slugify($value);
    }
439140
public function filter($value)
    {
        $dashToCamelCaseFilter       = new DashToCamelCase();
        $underscoreToCamelCaseFilter = new UnderscoreToCamelCase();

        $value = $dashToCamelCaseFilter->filter($value);
        $value = $underscoreToCamelCaseFilter->filter($value);

        return $value;
    }
137706
public function filter($value)
    {
        // perform some transformation upon $value to arrive on $valueFiltered
        $valueFiltered = strtoupper(trim($value));
        if (strlen($valueFiltered) == 6) {
            if (preg_match('/\d{4,4}[A-Z]{2,2}/', $valueFiltered)) {
                $valueFiltered = substr_replace($valueFiltered, ' ', 4, 0);
            }
        }

        return $valueFiltered;
    }