src/Traits/EventsTrait.php
public static function getEventDispatcher(): EventDispatcherInterface
    {
        if (isset(self::$dispatchers[static::class])) {
            return self::$dispatchers[static::class];
        }

        return self::$dispatchers[static::class] = new EventDispatcher();
    }
public static function getEventDispatcher(): EventDispatcherInterface
    {
        if (isset(self::$dispatchers[static::class])) {
            return self::$dispatchers[static::class];
        }

        return self::$dispatchers[static::class] = new EventDispatcher();
    }
public static function getEventDispatcher ( ) : EventDispatcherInterface { if ( isset ( self :: $ dispatchers [ static :: class ] ) ) { return self :: $ dispatchers [ static :: class ] ; } return self :: $ dispatchers [ static :: class ] = new EventDispatcher ( ) ; }
Get class associated event dispatcher or create default one.

@return EventDispatcherInterface
Get class associated event dispatcher or create default one .