We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29f5820 commit 3c5d2afCopy full SHA for 3c5d2af
src/putility/src/concepts/Service.js
@@ -33,6 +33,11 @@ class Service extends AdvancedBase {
33
static IMPLEMENTS = {
34
[TService]: {
35
init (...a) {
36
+ if ( this._.init_hooks ) {
37
+ for ( const hook of this._.init_hooks ) {
38
+ hook.call(this);
39
+ }
40
41
if ( ! this._init ) return;
42
return this._init(...a);
43
},
@@ -41,6 +46,9 @@ class Service extends AdvancedBase {
46
for ( const k in o ) this.$parameters[k] = o[k];
47
if ( ! this._construct ) return;
48
return this._construct(o);
49
+ },
50
+ get_depends () {
51
+ return this.get_depends?.() ?? [];
44
52
}
45
53
54
0 commit comments