@@ -48,4 +48,32 @@ public function getValueBool(string $app, string $key, bool $default = false, bo
4848
4949 return parent ::getValueBool ($ app , $ key , $ default , $ lazy );
5050 }
51+
52+ #[\Override]
53+ public function getValueInt (string $ app , string $ key , int $ default = 0 , bool $ lazy = false ): int {
54+ if (isset ($ this ->overWrite [$ app ]) && isset ($ this ->overWrite [$ app ][$ key ])) {
55+ return (int )$ this ->overWrite [$ app ][$ key ];
56+ }
57+
58+ return parent ::getValueInt ($ app , $ key , $ default , $ lazy );
59+ }
60+
61+ #[\Override]
62+ public function getValueFloat (string $ app , string $ key , float $ default = 0 , bool $ lazy = false ): float {
63+ if (isset ($ this ->overWrite [$ app ]) && isset ($ this ->overWrite [$ app ][$ key ])) {
64+ return (float )$ this ->overWrite [$ app ][$ key ];
65+ }
66+
67+ return parent ::getValueFloat ($ app , $ key , $ default , $ lazy );
68+ }
69+
70+ #[\Override]
71+ public function getValueArray (string $ app , string $ key , array $ default = [], bool $ lazy = false ): array {
72+ if (isset ($ this ->overWrite [$ app ]) && isset ($ this ->overWrite [$ app ][$ key ])) {
73+ $ value = json_decode ($ this ->overWrite [$ app ][$ key ], true );
74+ return is_array ($ value ) ? $ value : $ default ;
75+ }
76+
77+ return parent ::getValueArray ($ app , $ key , $ default , $ lazy );
78+ }
5179}
0 commit comments