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
2222 /** @var GeneratorField[] */
2323 public array $ fields = [];
2424
25+ private static $ dynamicVarrs = [];
26+
2527 /** @var GeneratorFieldRelation[] */
2628 public array $ relations = [];
2729
@@ -45,6 +47,23 @@ public function init()
4547 $ this ->prepareOptions ();
4648 }
4749
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+
4867 public function setCommand (Command &$ command )
4968 {
5069 $ this ->command = &$ command ;
You can’t perform that action at this time.
0 commit comments