@@ -26,7 +26,7 @@ class Server implements ServerInterface
26
26
protected $ http ;
27
27
protected $ manager ;
28
28
protected $ output ;
29
- protected $ port = 8080 ;
29
+ protected $ port = 8080 ;
30
30
protected $ queue = 'default ' ;
31
31
protected $ socket ;
32
32
protected $ websocket ;
@@ -302,12 +302,12 @@ public function usesQueue($connection = null, $name = null)
302
302
public function connector (Queue $ instance = null )
303
303
{
304
304
if ( ! is_null ($ instance )) {
305
- $ this ->config (__FUNCTION__ , $ instance );
306
- }
305
+ $ this ->manager ->connector ($ instance );
307
306
308
- $ this ->manager ()->connector ($ instance );
307
+ return $ this ;
308
+ }
309
309
310
- return $ this ;
310
+ return $ this -> manager ()-> connector () ;
311
311
}
312
312
313
313
/**
@@ -323,12 +323,12 @@ public function connector(Queue $instance = null)
323
323
public function queue ($ name = null )
324
324
{
325
325
if ( ! is_null ($ name )) {
326
- $ this ->config (__FUNCTION__ , $ name );
327
- }
326
+ $ this ->manager ()->queue ($ name );
328
327
329
- $ this ->manager ()->queue ($ name );
328
+ return $ this ;
329
+ }
330
330
331
- return $ this ;
331
+ return $ this -> manager ()-> queue () ;
332
332
}
333
333
334
334
/**
@@ -343,9 +343,13 @@ public function queue($name = null)
343
343
*/
344
344
public function logger (OutputInterface $ interface = null )
345
345
{
346
- $ this ->broker ()->logger ($ interface );
346
+ if ( ! is_null ($ interface )) {
347
+ $ this ->broker ()->logger ($ interface );
347
348
348
- return $ this ;
349
+ return $ this ;
350
+ }
351
+
352
+ return $ this ->broker ()->logger ();
349
353
}
350
354
351
355
/**
0 commit comments