File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
src/mg/AsterTrace/Handlers Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -86,16 +86,8 @@ public function handlePamiEvent(\PAMI\Message\Event\EventMessage $event)
8686 // First, dispatch the event to all generic event listeners
8787 $ this ->container ->eventDispatch ('anyEvent ' , $ event );
8888
89- // Get the class of the event, something like PAMI\Message\Event\SomeEvent.
90- $ eventClass = get_class ($ event );
91-
92- // Get to the last \ and copy from there.
93- $ eventName = substr ($ eventClass , strrpos ($ eventClass , '\\' ) + 1 );
94-
95- // Strip "Event" from the end of the string and lowercase the first letter.
96- $ eventName = lcfirst (substr ($ eventName , 0 , -5 ));
97-
9889 // After all of this, the resulting event name will be "some".
90+ $ eventName = lcfirst ($ event ->getName ());
9991 if (method_exists ($ event , 'getSubEvent ' )) {
10092 // If this event has a subevent string, then concatenate it to the
10193 // event name, like someSubEvent.
You can’t perform that action at this time.
0 commit comments