public function fetchFilter(string $key, $default = null, $filter = FILTER_DEFAULT, $options = [])
    {
        $value = $this->fetch($key, $default);

        if (!is_array($options) && $options) {
            $options = ['flags' => $options];
        }

        if (is_array($value) && !isset($options['flags'])) {
            $options['flags'] = FILTER_REQUIRE_ARRAY;
        }

        return filter_var($value, $filter, $options);
    }