6868use Config \Toolbar as ToolbarConfig ;
6969use Config \Validation as ValidationConfig ;
7070use Config \View as ViewConfig ;
71+ use Config \Services as AppServices ;
7172
7273/**
7374 * Services Configuration file.
@@ -275,8 +276,8 @@ public static function exceptions(
275276 }
276277
277278 $ config = $ config ?? config ('Exceptions ' );
278- $ request = $ request ?? static ::request ();
279- $ response = $ response ?? static ::response ();
279+ $ request = $ request ?? AppServices ::request ();
280+ $ response = $ response ?? AppServices ::response ();
280281
281282 return new Exceptions ($ config , $ request , $ response );
282283 }
@@ -303,7 +304,7 @@ public static function filters(FiltersConfig $config = null, bool $getShared = t
303304
304305 $ config = $ config ?? config ('Filters ' );
305306
306- return new Filters ($ config , static ::request (), static ::response ());
307+ return new Filters ($ config , AppServices ::request (), AppServices ::response ());
307308 }
308309
309310 //--------------------------------------------------------------------
@@ -416,7 +417,7 @@ public static function language(string $locale = null, bool $getShared = true)
416417 }
417418
418419 // Use '?:' for empty string check
419- $ locale = $ locale ?: static ::request ()->getLocale ();
420+ $ locale = $ locale ?: AppServices ::request ()->getLocale ();
420421
421422 return new Language ($ locale );
422423 }
@@ -483,7 +484,7 @@ public static function negotiator(RequestInterface $request = null, bool $getSha
483484 return static ::getSharedInstance ('negotiator ' , $ request );
484485 }
485486
486- $ request = $ request ?? static ::request ();
487+ $ request = $ request ?? AppServices ::request ();
487488
488489 return new Negotiate ($ request );
489490 }
@@ -507,7 +508,7 @@ public static function pager(PagerConfig $config = null, RendererInterface $view
507508 }
508509
509510 $ config = $ config ?? config ('Pager ' );
510- $ view = $ view ?? static ::renderer ();
511+ $ view = $ view ?? AppServices ::renderer ();
511512
512513 return new Pager ($ config , $ view );
513514 }
@@ -533,7 +534,7 @@ public static function parser(string $viewPath = null, ViewConfig $config = null
533534 $ viewPath = $ viewPath ?: config ('Paths ' )->viewDirectory ;
534535 $ config = $ config ?? config ('View ' );
535536
536- return new Parser ($ config , $ viewPath , static ::locator (), CI_DEBUG , static ::logger ());
537+ return new Parser ($ config , $ viewPath , AppServices ::locator (), CI_DEBUG , AppServices ::logger ());
537538 }
538539
539540 //--------------------------------------------------------------------
@@ -559,7 +560,7 @@ public static function renderer(string $viewPath = null, ViewConfig $config = nu
559560 $ viewPath = $ viewPath ?: config ('Paths ' )->viewDirectory ;
560561 $ config = $ config ?? config ('View ' );
561562
562- return new View ($ config , $ viewPath , static ::locator (), CI_DEBUG , static ::logger ());
563+ return new View ($ config , $ viewPath , AppServices ::locator (), CI_DEBUG , AppServices ::logger ());
563564 }
564565
565566 //--------------------------------------------------------------------
@@ -583,7 +584,7 @@ public static function request(App $config = null, bool $getShared = true)
583584
584585 return new IncomingRequest (
585586 $ config ,
586- static ::uri (),
587+ AppServices ::uri (),
587588 'php://input ' ,
588589 new UserAgent ()
589590 );
@@ -630,7 +631,7 @@ public static function redirectresponse(App $config = null, bool $getShared = tr
630631
631632 $ config = $ config ?? config ('App ' );
632633 $ response = new RedirectResponse ($ config );
633- $ response ->setProtocolVersion (static ::request ()->getProtocolVersion ());
634+ $ response ->setProtocolVersion (AppServices ::request ()->getProtocolVersion ());
634635
635636 return $ response ;
636637 }
@@ -652,7 +653,7 @@ public static function routes(bool $getShared = true)
652653 return static ::getSharedInstance ('routes ' );
653654 }
654655
655- return new RouteCollection (static ::locator (), config ('Modules ' ));
656+ return new RouteCollection (AppServices ::locator (), config ('Modules ' ));
656657 }
657658
658659 //--------------------------------------------------------------------
@@ -674,8 +675,8 @@ public static function router(RouteCollectionInterface $routes = null, Request $
674675 return static ::getSharedInstance ('router ' , $ routes , $ request );
675676 }
676677
677- $ routes = $ routes ?? static ::routes ();
678- $ request = $ request ?? static ::request ();
678+ $ routes = $ routes ?? AppServices ::routes ();
679+ $ request = $ request ?? AppServices ::request ();
679680
680681 return new Router ($ routes , $ request );
681682 }
@@ -721,10 +722,10 @@ public static function session(App $config = null, bool $getShared = true)
721722 }
722723
723724 $ config = $ config ?? config ('App ' );
724- $ logger = static ::logger ();
725+ $ logger = AppServices ::logger ();
725726
726727 $ driverName = $ config ->sessionDriver ;
727- $ driver = new $ driverName ($ config , static ::request ()->getIPAddress ());
728+ $ driver = new $ driverName ($ config , AppServices ::request ()->getIPAddress ());
728729 $ driver ->setLogger ($ logger );
729730
730731 $ session = new Session ($ driver , $ config );
@@ -755,7 +756,7 @@ public static function throttler(bool $getShared = true)
755756 return static ::getSharedInstance ('throttler ' );
756757 }
757758
758- return new Throttler (static ::cache ());
759+ return new Throttler (AppServices ::cache ());
759760 }
760761
761762 //--------------------------------------------------------------------
@@ -839,7 +840,7 @@ public static function validation(ValidationConfig $config = null, bool $getShar
839840
840841 $ config = $ config ?? config ('Validation ' );
841842
842- return new Validation ($ config , static ::renderer ());
843+ return new Validation ($ config , AppServices ::renderer ());
843844 }
844845
845846 //--------------------------------------------------------------------
@@ -859,7 +860,7 @@ public static function viewcell(bool $getShared = true)
859860 return static ::getSharedInstance ('viewcell ' );
860861 }
861862
862- return new Cell (static ::cache ());
863+ return new Cell (AppServices ::cache ());
863864 }
864865
865866 //--------------------------------------------------------------------
0 commit comments