This is the framework's default URL mapping implementation. It resolves a request using a regular expression to match against the request's URI and extracts the controller arguments from the URL using the pattern's groups.

The class is stateless. Meaning that you can repeatedly call any of its method without affecting its initial state.

Constructor

new (pattern:String, patternOptions:String, controllerClass:Class<Controller>, controllerFunctionName:String, ?httpMethod:String)

Methods

resolve (requestInfo:RequestInfo):ResolutionResult

Indicates if the request can be resolved using this mapping.

This implementation validates two things:

  • The request URI matches the mapping's regular expression
  • The request method matches the mapping's method, if provided

Parameters:

requestInfo

The HTTP request information

Returns:

The resolution results