Retrieve the event manager

Lazy-loads an EventManager instance if none registered.

@return EventManagerInterface
497672
public function getEventManager()
    {
        if (!$this->eventManager instanceof EventManagerInterface) {
            $this->setEventManager(new EventManager(array(__CLASS__, get_called_class())));
        }
        return $this->eventManager;
    }
441960
public function getModuleManager()
    {
        if (null === $this->moduleManager) {
            $this->moduleManager = $this->serviceManager->get('ModuleManager');
        }

        return $this->moduleManager;
    }
944155
public static function getDispatcher(): EventDispatcher
    {
        if (self::$dispatcher) {
            return self::$dispatcher;
        }

        return self::$dispatcher = self::createDispatcher();
    }
1298554
public function getDispatcher()
    {
        if (!$this->dispatcher && class_exists('Windwalker\Event\Dispatcher')) {
            $this->dispatcher = new Dispatcher();

            if (is_subclass_of($this, 'Windwalker\Evebt\DispatcherAwareInterface')) {
                ListenerMapper::add($this);
            }
        }

        return $this->dispatcher;
    }
940148
public function getObjectManager()
    {
        $manager = $this->registry->getManagerForClass($this->class);

        if (!$manager) {
            throw new \RuntimeException(sprintf(
                'Unable to find the mapping information for the class %s.'
                .' Please check the `auto_mapping` option'
                .' (http://symfony.com/doc/current/reference/configuration/doctrine.html#configuration-overview)'
                .' or add the bundle to the `mappings` section in the doctrine configuration.',
                $this->class
            ));
        }

        return $manager;
    }
196208
public function getLogManager(): ?LogManager
    {
        if (!$this->hasLogManager()) {
            $this->setLogManager($this->getDefaultLogManager());
        }
        return $this->logManager;
    }
54279
protected function buildManager()
    {
        $config = new Configuration;

        $this->setUpGeneralConfigurations($config);
        $this->setUpSpecificConfigurations($config);

        $eventManager = $this->getEventManager();
        if ($this->getEventSubscribers() !== null) {
            /* @var array $eventSubscribers */
            $eventSubscribers = $this->getEventSubscribers();

            foreach ($eventSubscribers as $eventSubscriber) {
                $eventManager->addEventSubscriber($eventSubscriber);
            }
        }

        return DocumentManager::create($this->getConnection($config), $config, $eventManager);
    }
1080520
public function getEventManager()
    {
        if (!$this->events instanceof EventManagerInterface) {
            $identifiers = array(__CLASS__, get_called_class());
            if (isset($this->eventIdentifier)) {
                if ((is_string($this->eventIdentifier))
                    || (is_array($this->eventIdentifier))
                    || ($this->eventIdentifier instanceof Traversable)
                ) {
                    $identifiers = array_unique($identifiers + (array) $this->eventIdentifier);
                } elseif (is_object($this->eventIdentifier)) {
                    $identifiers[] = $this->eventIdentifier;
                }
                // silently ignore invalid eventIdentifier types
            }
            $this->setEventManager(new EventManager($identifiers));
        }
        return $this->events;
    }
84177
public function getEventManager()
    {
        if (!$this->_eventManager) {
            if (!$this->_eventFactory) {
                $this->_eventFactory = new EventFactory();
            }
            $this->_eventManager = $this->_eventFactory->createEventManager();
            $this->bindLocalEvents();
        }
        return $this->_eventManager;
    }
626661
public function eventManager(EventManager $eventManager = null)
    {
        if ($eventManager !== null) {
            $this->_eventManager = $eventManager;
        }

        return $this->_eventManager;
    }
911015
protected function getEvent() {
        if ($this->event) {
            return $this->event;
        }
        $controller = $this->getController();
        if (!$controller instanceof InjectApplicationEventInterface) {
            throw new Exception\DomainException('getParam plugin requires a controller that implements InjectApplicationEventInterface');
        }
        $event = $controller->getEvent();
        if (!$event instanceof MvcEvent) {
            $params = $event->getParams();
            $event = new MvcEvent();
            $event->setParams($params);
        }
        $this->event = $event;
        return $this->event;
    }
724902
protected function setEventsManager()
    {
        $ev = new EventsManager();
        $ev->enablePriorities(true);
        $ev->collectResponses(true);
        $this->set('eventsManager', $ev, true);
        return $this;
    }
270721
protected function getEvent()
    {
        if (null === $this->event) {
            $this->event = $event = new EntityEvent;

            $event->setTarget($this);
        }

        return $this->event;
    }
998053
function moduleManager()
    {
        if (! $this->moduleManager ) {
            $mm = new ModuleManager;
            $mm->setTarget($this);
            $this->moduleManager = $mm;
        }

        return $this->moduleManager;
    }
577153
public static function getEventDispatcher(): EventDispatcherInterface
    {
        if (isset(self::$dispatchers[static::class])) {
            return self::$dispatchers[static::class];
        }

        return self::$dispatchers[static::class] = new EventDispatcher();
    }
653852
protected function getCacheManager()
    {
        if (null === $this->cacheManager) {
            $this->cacheManager = $this->get('sulu_media.format_manager');
        }

        return $this->cacheManager;
    }
900881
protected function getManager()
	{
		if( $this->manager === null ) {
			$this->manager = \Aimeos\MAdmin\Cache\Manager\Factory::createManager( $this->getContext() );
		}

		return $this->manager;
	}