final protected function filter(array &$data, array $scheme = [])
    {
        if (empty($scheme)) {
            $scheme = $this->scheme;
        }

        if (empty($scheme['filter'])) {
            return $data;
        }

        $filter = [];

        foreach ($scheme['filter'] as $f => $r) {
            $filter[$f] = $r;
        }

        if (empty($filter)) {
            return $data;
        }

        $result = filter_var_array($data, $filter);

        if (empty($result)) {
            return $data;
        }

        foreach ($result as $key => $value) {
            $data[$key] = $value;
        }

        return $data;
    }