Calls the filter per callback

@param  mixed $value Options for the set callable
@return mixed Result from the filter which was called
347215
public function filter($value)
    {
        $params = (array) $this->options['callback_params'];
        array_unshift($params, $value);

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

        return $this;
    }
638136
public function filter($value, $options = [])
    {
        $value = (string) $value;
        if ($this->getEncoding()) {
            return mb_strtoupper($value, $this->getEncoding());
        }

        return strtoupper($value);
    }
447018
public function setValue($value = null)
    {
        if (is_callable($value)) {
            $value = call_user_func($value);
        }

        $value = $this->handleJsonType($value);

        $this->value = $value;

        return $this;
    }
1026591
protected function filterValue($value)
    {
        if ($this->canFilterValue()) {
            return app('sleeping_owl.wysiwyg')->applyFilter($this->getEditor(), $value);
        }

        return $value;
    }
993720
public function filter($value)
    {
        if (!is_string($value) && $value !== null) {
            return $value;
        }

        return $this->getAdapter()->decompress($value);
    }
990071
public function filterValue($value)
    {
        if ($value instanceof Element\AbstractElement) {
            $name      = $value->getName();
            $type      = $value->getType();
            $realValue = $value->getValue();
        } else {
            $type      = null;
            $name      = null;
            $realValue = $value;
        }
        foreach ($this->filters as $filter) {
            if (((null === $type) || (!in_array($type, $filter['excludeByType']))) &&
                ((null === $name) || (!in_array($name, $filter['excludeByName'])))) {
                if (is_array($realValue)) {
                    foreach ($realValue as $k => $v) {
                        $params        = array_merge([$v], $filter['params']);
                        $realValue[$k] = call_user_func_array($filter['call'], $params);
                    }
                } else {
                    $params    = array_merge([$realValue], $filter['params']);
                    $realValue = call_user_func_array($filter['call'], $params);
                }
            }
        }
        if (($value instanceof Element\AbstractElement) && (null !== $realValue) && ($realValue != '')) {
            $value->setValue($realValue);
        }
        return $realValue;
    }
316061
public function normalizeValue($value)
	{
		if ($value instanceof AttributeFilter)
		{
			return $value;
		}

		if (is_callable($value))
		{
			return new AttributeFilter($value);
		}

		throw new InvalidArgumentException('Argument 1 passed to ' . __METHOD__ . ' must be a valid callback or an instance of s9e\\TextFormatter\\Configurator\\Items\\AttributeFilter');
	}
765429
protected function resolveInstanceMethod($value)
	{
		$callable = explode('->', $value);
		$instantiator = $this->instantiator;
		$callable[0] = $instantiator($callable[0]);
		return function (...$params) use ($callable) {
			return call_user_func_array($callable, $params);
		};
	}
678479
public function filter($value, $options = [])
    {
        if ($this->getPattern() == null) {
            $ex = new \Exception(get_class($this) . ' does not have a valid MatchPattern set.');
            throw $ex;
        }

        return preg_replace($this->getPattern(), $this->getReplacement(), $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;
    }
826907
public function action(callable $value = null)
    {
        if (null === $value) {
            return $this->action;
        }
        $this->action = $value;
        return $this;
    }
309486
public function resolve($value, $default = 'value')
    {
        $callable = $this->getCallable($value);

        if (is_array($callable)) {
            if (is_callable($callable[0])) {
                return call_user_func_array($callable[0], $callable[1]);
            } else {
                return $callable[0];
            }
        }

        return $this->fallback->resolve($value, $default);
    }
979050
public function filter($value)
    {
        $replace = $this->getReplaceCallback();
        $filtered = $value;

        foreach ($this->patterns as $index => $pattern)
        {
            $filtered = preg_replace_callback($pattern, $replace[$index], $filtered);
        }

        return $filtered;
    }
223740
public static function _($value, $filters = 'raw')
    {
        if (is_string($filters)) {
            $filters = Str::trim($filters);
            $filters = explode(',', $filters);

            if (count($filters) > 0) {
                foreach ($filters as $filter) {
                    $filterName = self::cmd($filter);

                    if ($filterName) {
                        if (method_exists(__CLASS__, $filterName)) {
                            $value = self::$filterName($value);
                        } else {
                            throw new Exception('Undefined filter method: ' . $filter);
                        }
                    }
                }
            }
        } elseif ($filters instanceof \Closure) {
            $value = $filters($value);
        }

        return $value;
    }
855756
protected function vaidateValue($value, $element)
    {
        if ($this->getFilter()) {
            if (is_string($this->getFilter())) {
                $f = $this->getFilter();
                $element->setValue($f($element->getValue()));
            } elseif (is_callable($this->getFilter())) {
                return call_user_func_array($this->getFilter(), [$value, $element]);
            }
        }

        return true;
    }