public static function create($pattern, $callback) {
        if (is_callable($callback)) {
            $route = new CallbackRoute($pattern, $callback);
        } else {
            $route = new ResourceRoute($pattern, $callback);
        }
        return $route;
    }