@@ -53,14 +53,14 @@ public function __construct($debugMode = FALSE, array $scanDirs = NULL, $tempDir
5353 public function loadConfiguration ()
5454 {
5555 $ config = $ this ->validateConfig ($ this ->defaults );
56- $ container = $ this ->getContainerBuilder ();
57- $ container ->addExcludedClasses ([UI \Control::class]);
56+ $ builder = $ this ->getContainerBuilder ();
57+ $ builder ->addExcludedClasses ([UI \Control::class]);
5858
5959 $ this ->invalidLinkMode = $ this ->debugMode
6060 ? UI \Presenter::INVALID_LINK_TEXTUAL | ($ config ['silentLinks ' ] ? 0 : UI \Presenter::INVALID_LINK_WARNING )
6161 : UI \Presenter::INVALID_LINK_WARNING ;
6262
63- $ application = $ container ->addDefinition ($ this ->prefix ('application ' ))
63+ $ application = $ builder ->addDefinition ($ this ->prefix ('application ' ))
6464 ->setClass (Nette \Application \Application::class)
6565 ->addSetup ('$catchExceptions ' , [$ config ['catchExceptions ' ]])
6666 ->addSetup ('$errorPresenter ' , [$ config ['errorPresenter ' ]]);
@@ -70,7 +70,7 @@ public function loadConfiguration()
7070 }
7171
7272 $ touch = $ this ->debugMode && $ config ['scanDirs ' ] ? $ this ->tempFile : NULL ;
73- $ presenterFactory = $ container ->addDefinition ($ this ->prefix ('presenterFactory ' ))
73+ $ presenterFactory = $ builder ->addDefinition ($ this ->prefix ('presenterFactory ' ))
7474 ->setClass (Nette \Application \IPresenterFactory::class)
7575 ->setFactory (Nette \Application \PresenterFactory::class, [new Nette \DI \Statement (
7676 Nette \Bridges \ApplicationDI \PresenterFactoryCallback::class, [1 => $ this ->invalidLinkMode , $ touch ]
@@ -80,31 +80,31 @@ public function loadConfiguration()
8080 $ presenterFactory ->addSetup ('setMapping ' , [$ config ['mapping ' ]]);
8181 }
8282
83- $ container ->addDefinition ($ this ->prefix ('linkGenerator ' ))
83+ $ builder ->addDefinition ($ this ->prefix ('linkGenerator ' ))
8484 ->setFactory (Nette \Application \LinkGenerator::class, [
8585 1 => new Nette \DI \Statement ('@Nette\Http\IRequest::getUrl ' ),
8686 ]);
8787
8888 if ($ this ->name === 'application ' ) {
89- $ container ->addAlias ('application ' , $ this ->prefix ('application ' ));
90- $ container ->addAlias ('nette.presenterFactory ' , $ this ->prefix ('presenterFactory ' ));
89+ $ builder ->addAlias ('application ' , $ this ->prefix ('application ' ));
90+ $ builder ->addAlias ('nette.presenterFactory ' , $ this ->prefix ('presenterFactory ' ));
9191 }
9292 }
9393
9494
9595 public function beforeCompile ()
9696 {
97- $ container = $ this ->getContainerBuilder ();
97+ $ builder = $ this ->getContainerBuilder ();
9898 $ all = [];
9999
100- foreach ($ container ->findByType (Nette \Application \IPresenter::class) as $ def ) {
100+ foreach ($ builder ->findByType (Nette \Application \IPresenter::class) as $ def ) {
101101 $ all [$ def ->getClass ()] = $ def ;
102102 }
103103
104104 $ counter = 0 ;
105105 foreach ($ this ->findPresenters () as $ class ) {
106106 if (empty ($ all [$ class ])) {
107- $ all [$ class ] = $ container ->addDefinition ($ this ->prefix (++$ counter ))->setClass ($ class );
107+ $ all [$ class ] = $ builder ->addDefinition ($ this ->prefix (++$ counter ))->setClass ($ class );
108108 }
109109 }
110110
0 commit comments