src/Route.php
public static function create($pattern, $callback) {
        if (is_callable($callback)) {
            $route = new CallbackRoute($pattern, $callback);
        } else {
            $route = new ResourceRoute($pattern, $callback);
        }
        return $route;
    }
public static function create($pattern, $callback) {
        if (is_callable($callback)) {
            $route = new CallbackRoute($pattern, $callback);
        } else {
            $route = new ResourceRoute($pattern, $callback);
        }
        return $route;
    }
Create and return a new route.

@param string $pattern The pattern for the route.
@param callable|string $callback Either a callback to map the route to or a string representing
a format for {@link sprintf()}.
@return \Garden\Route Returns the new route.