src/EventDispatcher.php
public static function dispatch($action, array $parameters = [])
    {
        if (isset(static::$listeners[$action])) {
            foreach (static::$listeners[$action] as $callback) {
                $response = call_user_func_array($callback, $parameters);

                if ($response !== null) {
                    return $response;
                }
            }
        }
    }
public static function dispatch($action, array $parameters = [])
    {
        if (isset(static::$listeners[$action])) {
            foreach (static::$listeners[$action] as $callback) {
                $response = call_user_func_array($callback, $parameters);

                if ($response !== null) {
                    return $response;
                }
            }
        }
    }
public static function dispatch ( $ action , array $ parameters = [ ] ) { if ( isset ( static :: $ listeners [ $ action ] ) ) { foreach ( static :: $ listeners [ $ action ] as $ callback ) { $ response = call_user_func_array ( $ callback , $ parameters ) ; if ( $ response !== null ) { return $ response ; } } } }
Dispatch the event name and pass the parameters to the callbacks.

@param string $action
@param array  $parameters
Dispatch the event name and pass the parameters to the callbacks .