Bootstrappers bootstrap different components of an Embla application. Every Bootstrapper adds one or more hooks to itself, each in which it can run initialization or deinitialization scripts. Check out the Hook class for information about each hook.
Each hook can return either an IoCContainer or a Future
, in which case
all changes to the IoC Container will be applied to the global container in the application.
class MyBoostrapper extends Bootstrapper {
@Hook.init
init() {
print('MyBootstrapper is starting!');
}
@Hook.bindings
bindings() {
return container
.bind(SomeInterface, toSubtype: SomeImplementation);
}
}
- Implemented by
Constructors
Properties
- container → IoCContainer
-
read-only
- hashCode → int
-
Get a hash code for this object.…
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
attach(
[IoCContainer container]) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.…
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited