public static function getInstance(string $name = 'default'): self
    {
        if (!isset(self::$instances[$name])) {
            self::setInstance($name, new self());
        }

        return self::$instances[$name];
    }
public static function getInstance(string $name = 'default'): self
    {
        if (!isset(self::$instances[$name])) {
            self::setInstance($name, new self());
        }

        return self::$instances[$name];
    }
public static function getInstance ( string $ name = 'default' ) : self { if ( ! isset ( self :: $ instances [ $ name ] ) ) { self :: setInstance ( $ name , new self ( ) ) ; } return self :: $ instances [ $ name ] ; }
Returns a named instance of the Event Dispatcher.
Returns a named instance of the Event Dispatcher .