Skip to main content
Version: Next

MidwayRequestContainer

Abstract Object Factory 对象容器抽象

Implements

Index

Constructors

constructor

Properties

publicparent

publicregistry

registry: ObjectDefinitionRegistry = ...

Methods

get

  • get<T>(identifier: string | ClassType<T>, args?: any): T
  • Type parameters

    • T = any

getAsync

  • getAsync<T>(identifier: string | ClassType<T>, args?: any): Promise<T>
  • Type parameters

    • T = any

getAttr

  • getAttr<T>(key: string): T
  • Get value from app attribute map


    Type parameters

    • T

getContext

  • getContext(): any

getDefinition

getIdentifier

  • getIdentifier(identifier: string | ClassType): string
  • Get IoC identifier

getInstanceScope

  • Get instance IoC container scope

getObject

  • Type parameters

    • T

hasDefinition

hasNamespace

  • hasNamespace(namespace: string): boolean

hasObject

registerObject

  • registerObject(identifier: string, obj: any): void

removeObject

setAttr

  • setAttr(key: string, value: any): void
  • Set value to app attribute map