版本:NextMethods
- addController(controllerClz: any, controllerOption: ControllerOption, functionMeta?: boolean): any
- addController(controllerClz: any, controllerOption: ControllerOption, resourceOptions?: { resourceFilter: (routerInfo: RouterInfo) => boolean }, functionMeta?: boolean): any
- addRouter(routerFunction: (...args: any[]) => void, routerInfoOption: DynamicRouterInfo): void
- getFlattenRouterTable(options?: { compileUrlPattern?: boolean }): Promise<RouterInfo[]>
- getMatchedRouterInfo(routerUrl: string, method: string): Promise<RouterInfo>
- getRouterTable(): Promise<Map<string, RouterInfo[]>>
- sortRouter(urlMatchList: RouterInfo[]): { _category: number; _level: number; _paramString: string; _pureRouter: string; _weight: number; controllerClz?: new (...args: any[]) => any; controllerId?: string; controllerMiddleware?: any[]; description?: string; fullUrl?: string; fullUrlCompiledRegexp?: RegExp; fullUrlFlattenString?: string; funcHandlerName?: string; functionMetadata?: any; functionName?: string; functionTriggerMetadata?: any; functionTriggerName?: string; handlerName?: string; id?: string; method: string | (...args: any[]) => void; middleware?: any[]; prefix?: string; requestMetadata?: any[]; requestMethod: string; responseMetadata?: any[]; routerName?: string; summary?: string; url: string | RegExp }[]
dynamically add a controller