DefaultRouter
public class DefaultRouter : Router
Undocumented
-
Undocumented
Declaration
Swift
public static let parametersJLRouteURLKey: String
-
Undocumented
Declaration
Swift
public static let parametersRouteURLKey: String
-
Undocumented
Declaration
Swift
public static let parametersJLRoutePatternKey: String
-
Undocumented
Declaration
Swift
public static let parametersRoutePatternKey: String
-
Undocumented
Declaration
Swift
public static let parametersWildcardKey: String
-
Undocumented
Declaration
Swift
public init()
-
Add a route pattern to your router
Throws
throws errors for wrong formatted patternsDeclaration
Swift
public func add(routePattern: String) throws
Parameters
routePattern
a route pattern defining
-
Route for an given url
Throws
throws routing errors if they occourDeclaration
Swift
public func route(url: URL) throws -> RouteResult?
Parameters
url
a url
Return Value
a RouteResult if the router can resolve the url, nil otherwise
-
Route for an given url
Throws
throws routing errors if they occourDeclaration
Swift
public func route(url: URL, parameters: [String : Any]?) throws -> RouteResult?
Parameters
url
a url
Return Value
a RouteResult if the router can resolve the url, nil otherwise
-
Route for an given url
Throws
throws routing errors if they occourDeclaration
Swift
public func route(url: URL, parameters: [String : Any]?, routingOption: RoutingOption?) throws -> RouteResult?
Parameters
url
a url
Return Value
a RouteResult if the router can resolve the url, nil otherwise