Get the discovered events and listeners for the application.

@return array
2924
protected function discoveredEvents()
    {
        if ($this->app->eventsAreCached()) {
            return require $this->app->getCachedEventsPath();
        }

        return $this->shouldDiscoverEvents()
                    ? $this->discoverEvents()
                    : [];
    }
1110191
public static function getDriverEvents()
    {
        return [
            DriverEvents::DRIVER_GET_CONFIGURATION => [
                ["getConfiguration", 0],
            ],
            DriverEvents::DRIVER_LOAD_CONFIGURATION => [
                ["loadConfiguration", 0],
            ],
            DriverEvents::INDEX_CREATE => [
                ["createIndex", 0],
            ],
            DriverEvents::INDEX_EXISTS => [
                ["indexExists", 0],
            ],
            DriverEvents::INDEX_DELETE => [
                ["deleteIndex", 0],
            ],
            DriverEvents::INDEXES_PERSIST => [
                ["persistIndexes", 0],
            ],
            DriverEvents::INDEX_SEARCH_QUERY => [
                ["executeSearchQuery", 0],
            ]
        ];
    }
534215
public function implementedEvents()
    {
        $events = parent::implementedEvents();

        $events['Crud.beforeRender'][] = ['callable' => [$this, 'publishSuccess']];

        if (method_exists($this, 'viewVar')) {
            $events['Crud.beforeRender'][] = ['callable' => [$this, 'publishViewVar']];
        }

        return $events;
    }
40612
protected function getListEvent()
    {
        $options = array(
            'order' => 'desc',
            'sort' => 'created',
            'limit' => $this->getLimit(),
            'severity' => $this->getParam('severity')
        );

        return (array) $this->report->getList($options);
    }
219959
public function listPublicNetworkEvents(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/networks/:owner/:repo/events',
            $this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
    }
952644
public function getListeners($eventName)
    {
        $listeners = isset($this->listeners[$eventName]) ? $this->listeners[$eventName] : [];

        $listeners = array_merge(
            $listeners,
            $this->getWildcardListeners($eventName)
        );

        return class_exists($eventName, false)
            ? $this->addInterfaceListeners($eventName, $listeners)
            : $listeners;
    }
93571
public function getListeners($event)
    {
        $parentListeners = [];
        $wildcards = [];

        if( is_object($event) )
        {
            $eventName = get_class($event);
            $parentListeners = $this->getParentListeners($event);
        }
        else
        {
            $eventName = $event;
            $wildcards = $this->getWildcardListeners($event);
        }

        if (!isset($this->sorted[$eventName])) {
            $this->sortListeners($eventName);
        }

        return array_merge($this->sorted[$eventName], $wildcards, $parentListeners);
    }
15203
public function getListenersForEvent($eventClassName)
    {
        if (FALSE === array_key_exists($eventClassName, $this->eventMap))
        {
            return [];
        }
        return $this->eventMap[$eventClassName];
    }
1337665
public function getCacheClearEvents() {
        Varien_Profiler::start('turpentine::helper::esi::getCacheClearEvents');
        $cacheKey = $this->getCacheClearEventsCacheKey();
        $events = @unserialize(Mage::app()->loadCache($cacheKey));
        if (is_null($events) || $events === false) {
            $events = $this->_loadEsiCacheClearEvents();
            Mage::app()->saveCache(serialize($events), $cacheKey,
                array('LAYOUT_GENERAL_CACHE_TAG'));
        }
        Varien_Profiler::stop('turpentine::helper::esi::getCacheClearEvents');
        return array_merge($this->getDefaultCacheClearEvents(), $events);
    }
274190
public function listenersOfEvent(Event $event)
    {
        $event_name = get_class($event);

        return isset($this->listeners[$event_name]) ? $this->listeners[$event_name] : [];
    }
763241
public static function discoverAll()
    {
        $components = [];

        // Run through all extensions
        foreach (ExtensionManagementUtility::getLoadedExtensionListArray() as $extensionKey) {
            $components = array_merge($components, self::discoverExtensionComponents($extensionKey));
        }

        return $components;
    }
217054
public function getListeners($event = null){
        if (!$event){
            return $this->listeners;
        }
        return isset($this->listeners[$event]) ? $this->listeners[$event] : null;
    }
366407
public function discoverEvents()
    {
        return collect($this->discoverEventsWithin())
                    ->reject(function ($directory) {
                        return ! is_dir($directory);
                    })
                    ->reduce(function ($discovered, $directory) {
                        return array_merge_recursive(
                            $discovered,
                            DiscoverEvents::within($directory, base_path())
                        );
                    }, []);
    }
785562
public function listIssueEvents(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/events',
            $this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
    }
682845
public function getAllActiveEvents(): array
    {
        $activeEvents = [];
        foreach (self::$eventsMap as $eventName => $eventClass) {
            if (!class_exists($eventClass)) {
                continue;
            }

            $activeEvents[] = $eventName;
        }

        $listeners = $this->eventDispatcher->getListeners();
        $activeEvents = array_unique(array_merge($activeEvents, array_keys($listeners)));

        asort($activeEvents);

        return $activeEvents;
    }
493693
public function events()
    {
        $array = $this->cal;
        $array = isset($array['VEVENT']) ? $array['VEVENT'] : array();
        $events = array();

        if (!empty($array)) {
            foreach ($array as $event) {
                $events[] = new Event($event);
            }
        }

        return $events;
    }
1231004
public function Events()
    {
        $action = $this->request->param('Action');
        //Debug::dump($this->request->params());

        //Normal & Registerable events
        $s = CalendarConfig::subpackage_settings('pagetypes');
        $indexSetting = $s['calendarpage']['index'];
        if ($action == 'eventregistration'
            || $action == 'eventlist'
            || ($action == '' && $indexSetting == 'eventlist')

        ) {
            $events = CalendarHelper::events_for_month($this->CurrentMonth());

            if ($action == 'eventregistration') {
                $events = $events
                    ->filter('Registerable', 1);
            }

            return $events;
        }


        //Search
        if ($action == 'search') {
            $query = $this->SearchQuery();
            $query = strtolower(addslashes($query));
            //Debug::dump($query);
            $qarr = preg_split('/[ +]/', $query);

            $filter = '';
            $first = true;
            foreach ($qarr as $qitem) {
                if (!$first) {
                    $filter .= " AND ";
                }

                $filter .= " (
					Title LIKE '%$qitem%'
					OR Details LIKE '%$qitem%'
				)";
                $first = false;
            }

            //Debug::dump($filter);
            $events = CalendarHelper::all_events()
                ->where($filter);
            return $events;
        }




        //TODO below doesn't need to be that complicated...
//		$events = null;
//		if ($action == 'past') {
//			$events = CalendarHelper::past_events();
//		} else {
//			if ($this->CurrentCategoryID()) {
//				$events = PublicEventCategory::get()
//					->ByID($this->CurrentCategoryID())
//					->ComingEvents($this->CurrentDisplayDate());
//			} else {
//				$events = CalendarHelper::coming_events($this->CurrentDisplayDate());
//			}
//		}
//
//		if ($this->CurrentCalendarID()) {
//			$events = $events->filter(array(
//				'CalendarID' => $this->CurrentCalendarID()
//			));
//		}
//
//		$list = new PaginatedList($events, $this->request);
//		$list->setPageLength(10);
//
//		return $list;
    }