Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 572 Bytes

File metadata and controls

28 lines (17 loc) · 572 Bytes

Initializer

1 What Does a Initializer Do?

An initializer is a class runs before application boot up, it's the recommended way to write plugin and hook to framework.

2 Usage

@Initialize()
class ServiceInitializer implements IInitializer {

    @Inject()
    private application: ApplicationLoader;

    public init() {
      // hook to framework
    }

}

A class decorated Initialize and implements interface IInitializer considered as a initializer. You can get application settings by inject ApplicationLoader.