# PlatformDriver Class platform

Module
import { PlatformDriver } from "@tsed/common"
Source/packages/common/src/platform/services/PlatformDriver.ts

# Overview

class PlatformDriver<T> implements IPlatformDriver<T> {
    protected platformHandler: PlatformHandler;
    raw: T;
    constructor(platformHandler: PlatformHandler);
    callback(): any;
    use(...handlers: any[]): this;
    addRoute({ method, path, handlers }: IPlatformRouteOptions): this;
    all(path: PathParamsType, ...handlers: any[]): this;
    get(path: PathParamsType, ...handlers: any[]): this;
    post(path: PathParamsType, ...handlers: any[]): this;
    put(path: PathParamsType, ...handlers: any[]): this;
    delete(path: PathParamsType, ...handlers: any[]): this;
    patch(path: PathParamsType, ...handlers: any[]): this;
    head(path: PathParamsType, ...handlers: any[]): this;
    options(path: PathParamsType, ...handlers: any[]): this;
    mapHandlers(handlers: any[]): any[];
}

# Description

Platform driver abstraction layer.

# Members

protected platformHandler: PlatformHandler;

raw: T;

callback(): any;

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

addRoute({ method, path, handlers }: IPlatformRouteOptions): this;

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

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

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

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

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

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

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

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

mapHandlers(handlers: any[]): any[];