public function notify($event, array $arguments = []): void
    {
        if (!isset($this->listeners[$event])) {
            return;
        }

        foreach ($this->listeners[$event] as $listener) {
            call_user_func_array($listener, $arguments);
        }
    }
public function notify($event, array $arguments = []): void
    {
        if (!isset($this->listeners[$event])) {
            return;
        }

        foreach ($this->listeners[$event] as $listener) {
            call_user_func_array($listener, $arguments);
        }
    }
public function notify ( $ event , array $ arguments = [ ] ) : void { if ( ! isset ( $ this -> listeners [ $ event ] ) ) { return ; } foreach ( $ this -> listeners [ $ event ] as $ listener ) { call_user_func_array ( $ listener , $ arguments ) ; } }
Notifies listeners of an event

@param string $event
@param array  $arguments Event arguments
@return void
Notifies listeners of an event