File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 20
20
use Nette \Configurator ;
21
21
use Nette \DI \Compiler ;
22
22
use Nette \DI \Config \Helpers ;
23
- use Nette \DI \Definitions \ServiceDefinition ;
24
23
use Nette \DI \Helpers as DIHelpers ;
25
24
use Nette \DI \Statement ;
26
25
use Nette \PhpGenerator \ClassType as ClassTypeGenerator ;
@@ -109,12 +108,9 @@ protected function loadHandlers(array $config): void
109
108
110
109
foreach ($ config ['handlers ' ] as $ handlerName => $ implementation ) {
111
110
112
- $ sd = new ServiceDefinition ();
113
- $ sd ->setFactory ($ implementation )->setAutowired (FALSE );
114
- $ serviceName = $ this ->prefix ('handler. ' . $ handlerName );
115
- $ builder ->addDefinition ($ serviceName , $ sd );
116
-
117
- $ builder ->getDefinition ($ serviceName )
111
+ $ builder ->addDefinition ($ this ->prefix ('handler. ' . $ handlerName ))
112
+ ->setFactory ($ implementation )
113
+ ->setAutowired (FALSE )
118
114
->addTag (self ::TAG_HANDLER )
119
115
->addTag (self ::TAG_PRIORITY , is_numeric ($ handlerName ) ? $ handlerName : 0 );
120
116
}
You can’t perform that action at this time.
0 commit comments