File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,10 @@ public function makeListener($listener, $wildcard = false)
369
369
return $ this ->createClassListener ($ listener , $ wildcard );
370
370
}
371
371
372
+ if (is_array ($ listener ) && isset ($ listener [0 ]) && is_string ($ listener [0 ])) {
373
+ return $ this ->createClassListener ($ listener , $ wildcard );
374
+ }
375
+
372
376
return function ($ event , $ payload ) use ($ listener , $ wildcard ) {
373
377
if ($ wildcard ) {
374
378
return $ listener ($ event , $ payload );
@@ -401,12 +405,14 @@ public function createClassListener($listener, $wildcard = false)
401
405
/**
402
406
* Create the class based event callable.
403
407
*
404
- * @param string $listener
408
+ * @param array| string $listener
405
409
* @return callable
406
410
*/
407
411
protected function createClassCallable ($ listener )
408
412
{
409
- [$ class , $ method ] = $ this ->parseClassCallable ($ listener );
413
+ [$ class , $ method ] = is_array ($ listener )
414
+ ? $ listener
415
+ : $ this ->parseClassCallable ($ listener );
410
416
411
417
if ($ this ->handlerShouldBeQueued ($ class )) {
412
418
return $ this ->createQueuedHandlerCallable ($ class , $ method );
You can’t perform that action at this time.
0 commit comments