-
Notifications
You must be signed in to change notification settings - Fork 1
Container – Extending
Bartosz Łaniewski edited this page Mar 28, 2018
·
1 revision
You can create your own containers and integrate them with Inra modules as long as they implement the ContainerInterface
, or just extend the default Container
class:
class MyContainer extends Container implements ContainerInterface {
cache: new Cache();
set(key: string, value: any): any {
return this.cache.set(key);
}
get(key: string, defaultValue: any): any {
return this.cache.get(key) || defaultValue;
}
}
This Wiki and indvidual modules READMEs contains a lot of information – please take your time and read these instructions carefully.