public function getEventHandler(): EventInterface
    {
        if (is_null(self::$globalEventHandler)) {
            //no need for a resolver because
            //there is a way to set this
            self::$globalEventHandler = new EventHandler();
        }

        if (is_null($this->eventHandler)) {
            $this->eventHandler = self::$globalEventHandler;
        }

        return $this->eventHandler;
    }
public function getEventHandler(): EventInterface
    {
        if (is_null(self::$globalEventHandler)) {
            //no need for a resolver because
            //there is a way to set this
            self::$globalEventHandler = new EventHandler();
        }

        if (is_null($this->eventHandler)) {
            $this->eventHandler = self::$globalEventHandler;
        }

        return $this->eventHandler;
    }
public function getEventHandler ( ) : EventInterface { if ( is_null ( self :: $ globalEventHandler ) ) { //no need for a resolver because //there is a way to set this self :: $ globalEventHandler = new EventHandler ( ) ; } if ( is_null ( $ this -> eventHandler ) ) { $ this -> eventHandler = self :: $ globalEventHandler ; } return $ this -> eventHandler ; }
Returns an EventHandler object
if none was set, it will auto create one

@return EventHandler
Returns an EventHandler object if none was set it will auto create one