RouterService
Class
RouterService
Hierarchy
RouterService
Index
Constructors
Properties
Methods
Constructors
constructor
new RouterService(config: RouterConfigInterface): RouterService
Defined in Library/Router/RouterService.ts:11
Parameters:
Name | Type |
---|---|
config | RouterConfigInterface |
Returns: RouterService
Properties
Private
config
config: RouterConfigInterface
Defined in Library/Router/RouterService.ts:11
Private
routes
routes: RegisteredRouteInterface[] = []
Defined in Library/Router/RouterService.ts:9
Methods
buildParameters
buildParameters(from: Array
<Key
>, result: RegExpExecArray
): __type
Defined in Library/Router/RouterService.ts:78
Parameters:
Name | Type |
---|---|
from | Array <Key > |
result | RegExpExecArray |
Returns: __type
getRegisteredRoutes
getRegisteredRoutes(): RegisteredRouteInterface[]
Defined in Library/Router/RouterService.ts:74
Returns: RegisteredRouteInterface[]
match
match(target: string
, route: RegisteredRouteInterface): __type
Defined in Library/Router/RouterService.ts:37
Parameters:
Name | Type |
---|---|
target | string |
route | RegisteredRouteInterface |
Returns: __type
registerRoute
registerRoute(method: RequestMethods, route: string
, controller: AbstractActionController, action: string
): this
Defined in Library/Router/RouterService.ts:65
Parameters:
Name | Type |
---|---|
method | RequestMethods |
route | string |
controller | AbstractActionController |
action | string |
Returns: this
registerRoutes
registerRoutes(routes: Array
< RouteInterface | Array
<RouteInterface>>): this
Defined in Library/Router/RouterService.ts:51
Parameters:
Name | Type |
---|---|
routes | Array < RouteInterface | Array <RouteInterface>> |
Returns: this
resolve
resolve(method: RequestMethods, target: string
): object
| null
Defined in Library/Router/RouterService.ts:19
Parameters:
Name | Type |
---|---|
method | RequestMethods |
target | string |
Returns: object
| null