protected function applyFilter($name, $value, $options = [])
    {
        $this->hasFilter($name);

        if (empty($value)) return $value;

        $filter = $this->filters[$name];

        if ($filter instanceof Closure) {
            return call_user_func_array($filter, compact('value', 'options'));
        }

        /** @var Filterable $filterable */
        $filterable = new $filter;

        return $filterable->filter($value, $options);
    }