@@ -143,7 +143,7 @@ public static function getCallback(?string $plugin, string $app, $call, array $a
143143 {
144144 $ plugin ??= '' ;
145145 $ isController = is_array ($ call ) && is_string ($ call [0 ]);
146- $ container = static :: container ( $ plugin ) ?? static :: container ( );
146+ $ container = config ( ' container ' , plugin: $ plugin ) ?? config ( ' container ' );
147147 $ middlewares = array_merge (
148148 $ middlewares ,
149149 Middleware::getMiddleware ($ plugin , $ app , $ isController ? $ call [0 ] : '' , $ withGlobalMiddleware )
@@ -165,13 +165,13 @@ public static function getCallback(?string $plugin, string $app, $call, array $a
165165 $ needInject = static ::isNeedInject ($ call , $ args );
166166 $ anonymousArgs = array_values ($ args );
167167 if ($ isController ) {
168- $ controllerReuse = static :: config ($ plugin , 'app.controller_reuse ' , true );
168+ $ controllerReuse = config ('app.controller_reuse ' , true , $ plugin );
169169 if (!$ controllerReuse ) {
170170 if ($ needInject ) {
171171 $ call = function ($ request ) use ($ call , $ plugin , $ args , $ container ) {
172172 $ call [0 ] = $ container ->make ($ call [0 ]);
173173 $ reflector = static ::getReflector ($ call );
174- $ args = array_values (static ::resolveMethodDependencies ($ container , $ request , array_merge ($ request ->all (), $ args ), $ reflector , static :: config ($ plugin , 'app.debug ' )));
174+ $ args = array_values (static ::resolveMethodDependencies ($ container , $ request , array_merge ($ request ->all (), $ args ), $ reflector , config ('app.debug ' , plugin: $ plugin )));
175175 return $ call (...$ args );
176176 };
177177 $ needInject = false ;
@@ -285,7 +285,7 @@ protected static function findFile(TcpConnection $connection, string $path, stri
285285
286286 if (isset ($ pathExplodes [1 ]) && $ pathExplodes [0 ] === config ('app.plugin_uri ' , 'app ' )) {
287287 $ plugin = $ pathExplodes [1 ];
288- $ publicDir = static :: config ($ plugin , 'app.public_path ' ) ?: Path::basePath (config ('app.plugin_alias ' , 'plugin ' ) . "/ $ plugin/public " );
288+ $ publicDir = config ('app.public_path ' , plugin: $ plugin ) ?: Path::basePath (config ('app.plugin_alias ' , 'plugin ' ) . "/ $ plugin/public " );
289289 $ path = substr ($ path , strlen ("/ " . config ('app.plugin_uri ' , 'app ' ) . "/ $ plugin/ " ));
290290 } else {
291291 $ publicDir = Path::publicPath ();
@@ -297,7 +297,7 @@ protected static function findFile(TcpConnection $connection, string $path, stri
297297 }
298298
299299 if (pathinfo ($ file , PATHINFO_EXTENSION ) === 'php ' ) {
300- if (!static :: config ($ plugin , 'app.support_php_files ' , false )) {
300+ if (!config ('app.support_php_files ' , false , $ plugin )) {
301301 return false ;
302302 }
303303
@@ -310,7 +310,7 @@ protected static function findFile(TcpConnection $connection, string $path, stri
310310 return true ;
311311 }
312312
313- if (!static :: config ($ plugin , 'static.enable ' , false )) {
313+ if (!config ('static.enable ' , false , $ plugin )) {
314314 return false ;
315315 }
316316
0 commit comments