-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
42 lines (40 loc) · 913 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* BaseContextClass is a base class that can be extended,
* it's instantiated in context level,
* {@link Helper}, {@link Service} is extending it.
*/
class BaseContextClass {
/**
* @constructor
* @param {Context} ctx - context instance
* @since 1.0.0
*/
constructor(ctx) {
/**
* @member {Context} BaseContextClass#ctx
* @since 1.0.0
*/
this.ctx = ctx;
/**
* @member {Application} BaseContextClass#app
* @since 1.0.0
*/
this.app = ctx.app.app;
/**
* @member {Config} BaseContextClass#config
* @since 1.0.0
*/
this.config = this.app.options;
/**
* @member {Service} BaseContextClass#service
* @since 1.0.0
*/
this.service = ctx.service;
/**
* @member {Service} BaseContextClass#logger
* @since 1.0.0
*/
this.logger = this.app.console;
}
}
module.exports = BaseContextClass;