25
25
use FreeDSx \Ldap \Server \RequestHistory ;
26
26
use FreeDSx \Ldap \Server \ServerProtocolFactory ;
27
27
use FreeDSx \Ldap \Server \ServerRunner \PcntlServerRunner ;
28
+ use FreeDSx \Ldap \Server \ServerRunner \ServerRunnerInterface ;
28
29
use FreeDSx \Ldap \Server \SocketServerFactory ;
29
30
use FreeDSx \Socket \SocketPool ;
30
31
@@ -145,7 +146,7 @@ className: ServerProtocolFactory::class,
145
146
factory: $ this ->makeServerProtocolFactory (...),
146
147
);
147
148
$ this ->registerFactory (
148
- className: PcntlServerRunner ::class,
149
+ className: ServerRunnerInterface ::class,
149
150
factory: $ this ->makePcntlServerRunner (...),
150
151
);
151
152
$ this ->registerFactory (
@@ -197,8 +198,10 @@ private function makeRootDseLoader(): RootDseLoader
197
198
private function makeServerProtocolFactory (): ServerProtocolFactory
198
199
{
199
200
return new ServerProtocolFactory (
200
- $ this ->get (HandlerFactory::class),
201
- $ this ->get (ServerOptions::class),
201
+ handlerFactory: $ this ->get (HandlerFactoryInterface::class),
202
+ logger: $ this ->get (ServerOptions::class)->getLogger (),
203
+ serverProtocolHandlerFactory: $ this ->get (ServerProtocolHandlerFactory::class),
204
+ serverAuthorization: $ this ->get (ServerAuthorization::class),
202
205
);
203
206
}
204
207
@@ -207,11 +210,11 @@ private function makeHandlerFactory(): HandlerFactory
207
210
return new HandlerFactory ($ this ->get (ServerOptions::class));
208
211
}
209
212
210
- private function makePcntlServerRunner (): PcntlServerRunner
213
+ private function makePcntlServerRunner (): ServerRunnerInterface
211
214
{
212
215
return new PcntlServerRunner (
213
- $ this ->get (ServerProtocolFactory::class),
214
- $ this ->get (ServerOptions::class)->getLogger (),
216
+ serverProtocolFactory: $ this ->get (ServerProtocolFactory::class),
217
+ logger: $ this ->get (ServerOptions::class)->getLogger (),
215
218
);
216
219
}
217
220
@@ -220,8 +223,8 @@ private function makeSocketServerFactory(): SocketServerFactory
220
223
$ serverOptions = $ this ->get (ServerOptions::class);
221
224
222
225
return new SocketServerFactory (
223
- $ serverOptions ,
224
- $ serverOptions ->getLogger (),
226
+ options: $ serverOptions ,
227
+ logger: $ serverOptions ->getLogger (),
225
228
);
226
229
}
227
230
@@ -233,8 +236,9 @@ private function makeServerAuthorizer(): ServerAuthorization
233
236
private function makeServerProtocolHandlerFactory (): ServerProtocolHandlerFactory
234
237
{
235
238
return new ServerProtocolHandlerFactory (
236
- $ this ->get (HandlerFactoryInterface::class),
237
- new RequestHistory ()
239
+ handlerFactory: $ this ->get (HandlerFactoryInterface::class),
240
+ options: $ this ->get (ServerOptions::class),
241
+ requestHistory: new RequestHistory (),
238
242
);
239
243
}
240
244
}
0 commit comments