8000 GitHub - Lazarus404/injector: Dependency injector for Haxe
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Lazarus404/injector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Injector (a cross-platform injection library used by Cube)

Injector is a haXe injection library loosely based on the SwiftSuspenders injection library used by RobotLegs.

Using Injector

The Injector provides a means to inject an existing instance, a new instance or a singleton into a variable flagged with the @Inject meta tag: -

injector.mapInstance( MyType, someObject ); injector.mapClass( MyType, SomeClass ); injector.mapSingleton( MyType, SomeSingleton );

Injection then occurs from a manual invocation: -

Injector.inject( myInstance );

In myInstance, there will then need to be class level properties that have the @Inject meta, such as: -

@Inject public var myVar : MyType;

About

Dependency injector for Haxe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0