@@ -65,16 +65,17 @@ public function loadConfiguration()
6565 $ application = $ builder ->addDefinition ($ this ->prefix ('application ' ))
6666 ->setFactory (Nette \Application \Application::class)
6767 ->addSetup ('$catchExceptions ' , [$ config ['catchExceptions ' ]])
68- ->addSetup ('$errorPresenter ' , [$ config ['errorPresenter ' ]]);
68+ ->addSetup ('$errorPresenter ' , [$ config ['errorPresenter ' ]])
69+ ->setExported ();
6970
7071 if ($ config ['debugger ' ]) {
7172 $ application ->addSetup ('Nette\Bridges\ApplicationTracy\RoutingPanel::initializePanel ' );
7273 }
7374
7475 $ touch = $ this ->debugMode && $ config ['scanDirs ' ] ? $ this ->tempFile : null ;
7576 $ presenterFactory = $ builder ->addDefinition ($ this ->prefix ('presenterFactory ' ))
76- ->setClass (Nette \Application \IPresenterFactory::class)
77- ->setFactory (Nette \Application \PresenterFactory::class, [new Nette \DI \Statement (
77+ ->setType (Nette \Application \IPresenterFactory::class)
78+ ->setFactory (Nette \Application \PresenterFactory::class, [new Nette \DI \Definitions \ Statement (
7879 Nette \Bridges \ApplicationDI \PresenterFactoryCallback::class, [1 => $ this ->invalidLinkMode , $ touch ]
7980 )]);
8081
@@ -84,8 +85,9 @@ public function loadConfiguration()
8485
8586 $ builder ->addDefinition ($ this ->prefix ('linkGenerator ' ))
8687 ->setFactory (Nette \Application \LinkGenerator::class, [
87- 1 => new Nette \DI \Statement ('@Nette\Http\IRequest::getUrl ' ),
88- ]);
88+ 1 => new Nette \DI \Definitions \Statement ('@Nette\Http\IRequest::getUrl ' ),
89+ ])
90+ ->setExported ();
8991
9092 if ($ this ->name === 'application ' ) {
9193 $ builder ->addAlias ('application ' , $ this ->prefix ('application ' ));
@@ -100,21 +102,23 @@ public function beforeCompile()
100102 $ all = [];
101103
102104 foreach ($ builder ->findByType (Nette \Application \IPresenter::class) as $ def ) {
103- $ all [$ def ->getClass ()] = $ def ;
105+ $ all [$ def ->getType ()] = $ def ;
104106 }
105107
106108 $ counter = 0 ;
107109 foreach ($ this ->findPresenters () as $ class ) {
108110 if (empty ($ all [$ class ])) {
109- $ all [$ class ] = $ builder ->addDefinition ($ this ->prefix ((string ) ++$ counter ))->setClass ($ class );
111+ $ all [$ class ] = $ builder ->addDefinition ($ this ->prefix ((string ) ++$ counter ))
112+ ->setType ($ class )
113+ ->setExported ();
110114 }
111115 }
112116
113117 foreach ($ all as $ def ) {
114118 $ def ->addTag (Nette \DI \Extensions \InjectExtension::TAG_INJECT )
115- ->addTag ('nette.presenter ' , $ def ->getClass ());
119+ ->addTag ('nette.presenter ' , $ def ->getType ());
116120
117- if (is_subclass_of ($ def ->getClass (), UI \Presenter::class)) {
121+ if (is_subclass_of ($ def ->getType (), UI \Presenter::class)) {
118122 $ def ->addSetup ('$invalidLinkMode ' , [$ this ->invalidLinkMode ]);
119123 }
120124 }
0 commit comments