# Class PlatformRouter

Class
Module
import { PlatformRouter } from "@tsed/platform-router"
Source/packages/platform/platform-router/src/types/domain/PlatformRouter.ts

# Overview

class PlatformRouter {
    #private;
    protected readonly injector: InjectorService;
    readonly layers: PlatformLayer[];
    provider: Provider;
    constructor(injector: InjectorService);
    use(...handlers: any[]): this;
    addRoute(method: string, path: SinglePathType, handlers: any[], opts?: PlatformLayerOptions): this;
    all(path: SinglePathType, ...handlers: any[]): this;
    get(path: SinglePathType, ...handlers: any[]): this;
    post(path: SinglePathType, ...handlers: any[]): this;
    put(path: SinglePathType, ...handlers: any[]): this;
    delete(path: SinglePathType, ...handlers: any[]): this;
    patch(path: SinglePathType, ...handlers: any[]): this;
    head(path: SinglePathType, ...handlers: any[]): this;
    options(path: SinglePathType, ...handlers: any[]): this;
    statics(path: string, options: any): this;
    inspect(): {
        handlers: any[];
        path: any;
        basePath: string;
        method: string;
        opts: {};
    }[];
    isBuilt(): boolean;
}

# Members

#private;

protected readonly injector: InjectorService;

readonly layers: PlatformLayer[];

provider: Provider;

use(...handlers: any[]): this;

addRoute(method: string, path: SinglePathType, handlers: any[], opts?: PlatformLayerOptions): this;

all(path: SinglePathType, ...handlers: any[]): this;

get(path: SinglePathType, ...handlers: any[]): this;

post(path: SinglePathType, ...handlers: any[]): this;

put(path: SinglePathType, ...handlers: any[]): this;

delete(path: SinglePathType, ...handlers: any[]): this;

patch(path: SinglePathType, ...handlers: any[]): this;

head(path: SinglePathType, ...handlers: any[]): this;

options(path: SinglePathType, ...handlers: any[]): this;

statics(path: string, options: any): this;

inspect(): {
     handlers: any[];
     path: any;
     basePath: string;
     method: string;
     opts: {};
 }[];

isBuilt(): boolean;