Parses the request URL into controller, action, and parameters. Uses the connected routes to match the incoming URL string to parameters that will allow the request to be dispatched. Also handles converting parameter lists into URL strings, using the connected routes. Routing allows you to decouple the way the world interacts with your application (URLs) and the implementation (controllers and actions). ### Connecting routes Connecting routes is done using Router.connect(). When parsing incoming requests or reverse matching parameters, routes are enumerated in the order they were connected. For more information on routes and how to connect them see Router.connect().
Inherited | Abstract | Final | Static | Datatype | Header |
---|---|---|---|---|---|
arrayarray | | ||||
string | string defaultRouteClass(string routeclassname = null) | ||||
Json[string] | Json[string] _applyUrlFilters(Json[string] url) | ||||
DServerRequest | DServerRequest getRequest() | ||||
string | string fullBaseUrl(string baseUrl = null) | ||||
Json[string] | Json[string] reverseToArray(ServerRequest|array params) | ||||
void | void reload() | ||||
string | string reverse(DServerRequest/* array */ params, bool isFull = false) | ||||
void | void setRouteCollection(RouteCollection routeCollection) | ||||
RouteBuilder | RouteBuilder createRouteBuilder(string path, Json[string] options = null) | ||||
void | void setRequest(DServerRequest myrequest) | ||||
STRINGAA | STRINGAA getNamedExpressions() | ||||
void | void resetRoutes() | ||||
string | string pathUrl(string path, Json[string] params = [], bool isFull = false) | ||||
string | string normalize(string[] url = "/") | ||||
Json[string] | Json[string] unwrapShortString(Json[string] url) | ||||
bool | bool routehasKey(string[] url = null, bool isFull = false) | ||||
void | void addUrlFilter(Closure myfunction) | ||||
string[] | string[] extensions(string[]/* string */ myextensions = null, bool shouldMerge = true) | ||||
RouteCollection | RouteCollection getRouteCollection() | ||||
Json[string] | Json[string] parseRequest(ServerRequest myrequest) | ||||
string | string url(/* IUri| */string[] url = null, bool isFull = false) | ||||
Route[] | Route[] routes() |