public static function addFilter($filter, $callback = null)
    {
        if (is_array($filter)) {
            $filters = $filter;
            foreach ($filters as $key => $filter) {
                if (is_numeric($key)) {
                    $key = $filter;
                }
                self::addFilter($key, $filter);
            }

            return true;
        } elseif (is_string($filter) && class_exists($filter, false) && is_subclass_of($filter, 'FilterCollection')) {
            foreach (get_class_methods($filter) as $f) {
                if (is_callable(array($filter, $f))) {
                    self::$filters[$f] = array($filter, $f);
                }
            }

            return true;
        }
        if (is_null($callback)) {
            $callback = $filter;
        }

        if (!is_callable($callback)) {
            return false;
        }
        self::$filters[$filter] = $callback;
    }