File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ class GeneratorConfig
22
22
/** @var GeneratorField[] */
23
23
public array $ fields = [];
24
24
25
+ private static $ dynamicVarrs = [];
26
+
25
27
/** @var GeneratorFieldRelation[] */
26
28
public array $ relations = [];
27
29
@@ -45,6 +47,23 @@ public function init()
45
47
$ this ->prepareOptions ();
46
48
}
47
49
50
+ public static function addDynamicVar (string $ name , $ value )
51
+ {
52
+ self ::$ dynamicVarrs [$ name ] = $ value ;
53
+ }
54
+
55
+ public static function addDynamicVars (array $ vars )
56
+ {
57
+ foreach ($ vars as $ key => $ value ) {
58
+ self ::$ dynamicVarrs [$ key ] = $ value ;
59
+ }
60
+ }
61
+
62
+ public function getDynamicVar (string $ name )
63
+ {
64
+ return self ::$ dynamicVarrs [$ name ];
65
+ }
66
+
48
67
public function setCommand (Command &$ command )
49
68
{
50
69
$ this ->command = &$ command ;
You can’t perform that action at this time.
0 commit comments