File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,18 @@ public function __construct($requestStartTime = null)
21
21
$ this ->exporter = new ValueExporter ();
22
22
}
23
23
24
- public function onWildcardEvent ()
24
+ public function onWildcardEvent ($ name = null , $ data = [] )
25
25
{
26
- $ name = $ this ->events ->firing ();
27
- $ time = microtime (true );
26
+ // Pre-Laravel 5.4, using 'firing' to get the current event name.
27
+ if (method_exists ($ this ->events , 'firing ' )) {
28
+ $ name = $ this ->events ->firing ();
29
+
30
+ // Get the arguments passed to the event
31
+ $ data = func_get_args ();
32
+ }
28
33
29
- // Get the arguments passed to the event
30
- $ params = $ this -> prepareParams ( func_get_args () );
34
+ $ params = $ this -> prepareParams ( $ data );
35
+ $ time = microtime ( true );
31
36
32
37
// Find all listeners for the current event
33
38
foreach ($ this ->events ->getListeners ($ name ) as $ i => $ listener ) {
You can’t perform that action at this time.
0 commit comments