Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/mandarinets/mvc-framework/core/internal/components/routing/controllerContext.ts>ControllerComponent

Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Latest
class ControllerComponent
import { ControllerComponent } from "https://deno.land/x/mandarinets@v2.3.2/mvc-framework/core/internal/components/routing/controllerContext.ts";

This class is used in the DI Container for Mandarine to store components annotated as @Controller It contains all the behavior of a controller, like its routes and the methods of the routes.

Constructors

new
ControllerComponent(
name?: string,
route?: string,
handlerType?: any,
handler?: any,
)

Properties

private
actions: Map<String, Mandarine.MandarineMVC.Routing.RoutingAction>
private
classHandler: any
private
classHandlerType: any
private
optional
name: string
private
optional
route: string
options: Mandarine.MandarineMVC.Routing.RoutingOptions & any

Methods

private
initializeRouteContextOptions(routeContext: Mandarine.MandarineMVC.Routing.RoutingAnnotationContext, classHandler: any)
private
initializeRoutes(): void
private
initializeRoutingActionContext(routeAction: Mandarine.MandarineMVC.Routing.RoutingAction)
private
processParamRoutes(routeAction: Mandarine.MandarineMVC.Routing.RoutingAction)
existRoutingAction(actionMethodName: string): boolean
getActionName(methodName: string): string
getActionRoute(routeAction: Mandarine.MandarineMVC.Routing.RoutingAction): string
getActions(): Map<String, Mandarine.MandarineMVC.Routing.RoutingAction>
getFullRoute(route: string)
getName(): string
getRoute(): string
getRoutingAction(actionMethodName: string): Mandarine.MandarineMVC.Routing.RoutingAction | undefined
initializeMiddleware(middlewareList: Array<NonComponentMiddlewareTarget | Mandarine.Types.MiddlewareComponent> | undefined): Array<NonComponentMiddlewareTarget | Mandarine.Types.MiddlewareComponent>
registerAction(routeAction: Mandarine.MandarineMVC.Routing.RoutingAction): void
setClassHandler(classHandler: any)
setRoute(route: string | undefined): void
validateRouteSignature(routeSignature: Array<string> | null)