Check Is Event Registered.

@param string $eventName
@return bool
332915
public function hasListeners(string $eventName) : bool
    {
        return isset($this->events[$eventName]) && count($this->events[$eventName]) > 0;
    }
745487
public function hasListeners($eventName = null) {

	    if($eventName) {
            return !empty($this->registry[$eventName]);
        }

        foreach($this->registry as $eventName => $listeners) {
            if(!empty($listeners)) {
                return true;
            }
        }

        return false;

    }
107571
public function hasEventsManager() {
		if ($this->_eventsManager !== null) {
			return true;
		}
		
		if ($this instanceof LocatorAwareInterface && $this->hasLocator()
			&& $this->getLocator()->has($this->getEventsManagerServiceId())) {
			return true;
		}
		
		return false;
	}
153927
public function getListeners($eventName = null)
    {

        if (empty($eventName)) return $this->listeners;
        if (!empty($eventName) && !isset($this->listeners[$eventName])) return [];

        return $this->listeners[$eventName];
    }
356719
private function hasScript($eventName, $script)
    {
        $scripts = $this->event->getComposer()->getPackage()->getScripts();
        if (!isset($scripts[$eventName])) {
            return false;
        }

        return in_array($script, $scripts[$eventName]);
    }
1210799
protected function getEventPriority($eventName)
    {
        $suffix = $this->getEventSuffix($eventName);

        if ($suffix === static::UPDATE) {
            return 9999;
        } elseif ($suffix === static::INSERT) {
            return 9998;
        } elseif ($suffix === static::DELETE) {
            return 9997;
        }

        return parent::getEventPriority($eventName);
    }
1344759
protected function createEvent($eventName)
    {
        if (null === $this->defaultEvent) {
            return new Event($eventName);
        }
        $event = clone $this->defaultEvent;
        $event->setName($eventName);
        return $event;
    }
927908
public function findOne($eventName)
    {
        foreach ($this->events as $event) {
            if ((string) new EventName($event) === $eventName) {
                return $event;
            }
        }

        return null;
    }
250583
public function getEventLog(Event $event, $eventName)
    {
        $eventLog = $this->getEventLogObject($this->getEventLogInfo($event, $eventName));

        if (null === $eventLog) {
            return null;
        }

        $eventLog->setTypeId($eventName);
        $eventLog->setIp($this->getClientIp());
        $eventLog->setEventTime(new \DateTime());
        $this->setUser($eventLog);

        return $eventLog;
    }
172379
protected function fetchEvent($eventName)
    {
        return (array_key_exists($eventName, $this->events)) ? $this->events[$eventName] : null;
    }
397885
protected function getEventLogInfo(Event $event, $eventName)
    {
        if ($event instanceof EmbeddedEventResolverInterface) {
            return $event->getEventLogInfo($eventName);
        }

        if (null === $eventResolver = $this->getResolver($eventName)) {
            return null;
        }

        return $eventResolver->getEventLogInfo($event, $eventName);
    }
913138
public function hasListener($event): bool
    {
        $name = $this->getEventName($event);

        if (isset($this->listeners[$name])) {
            foreach ($this->listeners[$name] as $listeners) {
                if (count($listeners) > 0) {
                    return true;
                }
            }
        }

        unset($name);

        return false;
    }
1217017
public function isMatch(Event $event)
    {
        if (is_callable($this->checker)) {
            return call_user_func($this->checker, $event);
        }
        return false;
    }
318770
public function fireEvent($eventName, Event $event = null)
    {
        /** @var EventDispatcher $events */
        $events = $this['events'];

        return $events->dispatch($eventName, $event);
    }
204187
public function getAccessLevelsForEvent($eventName)
    {
        if (!isset($this->items[$eventName])) {
            return false;
        }
        
        return $this->items[$eventName];
    }
679756
public function isRegistered($entityClassName)
    {
        if ($entityClassName instanceof Entity) {
            $reflection = new \ReflectionClass($entityClassName); // @codeCoverageIgnore
            $entityClassName = $reflection->getName(); // @codeCoverageIgnore
        } // @codeCoverageIgnore

        return isset($this->entities[$entityClassName]);
    }
1253772
public function on(string $eventName, BaseEvent $data)
    {
        return $this->c->ed->dispatch($eventName, $data);
    }