Return all of the core event files.

@return array Core events.
188049
protected static function get_core_eventlist() {
        global $CFG;

        // Disable developer debugging as deprecated events will fire warnings.
        // Setup backup variables to restore the following settings back to what they were when we are finished.
        $debuglevel          = $CFG->debug;
        $debugdisplay        = $CFG->debugdisplay;
        $debugdeveloper      = $CFG->debugdeveloper;
        $CFG->debug          = 0;
        $CFG->debugdisplay   = false;
        $CFG->debugdeveloper = false;

        $eventinformation = array();
        $directory = $CFG->libdir . '/classes/event';
        $files = self::get_file_list($directory);

        // Remove exceptional events that will cause problems being displayed.
        if (isset($files['unknown_logged'])) {
            unset($files['unknown_logged']);
        }
        foreach ($files as $file => $location) {
            $classname = '\\core\\event\\' . $file;
            // Check to see if this is actually a valid event.
            if (method_exists($classname, 'get_static_info')) {
                $ref = new \ReflectionClass($classname);
                // Ignore abstracts.
                if (!$ref->isAbstract() && $file != 'manager') {
                    $eventinformation[$classname] = $classname::get_name_with_info();
                }
            }
        }
        // Now enable developer debugging as event information has been retrieved.
        $CFG->debug          = $debuglevel;
        $CFG->debugdisplay   = $debugdisplay;
        $CFG->debugdeveloper = $debugdeveloper;
        return $eventinformation;
    }
814576
protected function getConfigFilesByComposer(): array
    {
        $this->getLogger()->write('<info>Searching for ".apishka" files</info>');

        if ($this->getEvent() === null)
            throw new \LogicException('Event not exists');

        $configs = array();
        if ($this->isDependantPackage($this->getEvent()->getComposer()->getPackage()))
        {
            $path = $this->getConfigPackagePath(
                rtrim($this->getRootPackagePath(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR,
                $this->getEvent()->getComposer()->getPackage()
            );

            if ($path)
                $configs[$this->getEvent()->getComposer()->getPackage()->getName()] = $path;
        }

        $packages = $this->getEvent()->getComposer()->getRepositoryManager()->getLocalRepository()->getPackages();
        foreach ($packages as $package)
        {
            if ($this->isDependantPackage($package, false))
            {
                $path = $this->getConfigPackagePath(
                    $this->getEvent()->getComposer()->getInstallationManager()->getInstallPath($package),
                    $package
                );

                if ($path)
                    $configs[$package->getName()] = $path;
            }
        }

        ksort($configs);

        Cacher::getInstance()->set(
            $this->getConfigsCacheName(),
            $configs
        );

        return $configs;
    }
970014
public function getMigrationsFiles()
    {
        $files = [];
        foreach ($this->orm->getComponents(true) as $component) {
            if ($component instanceof AppInterface) {
                $fileHandler = FileHandler::createObject(
                    [
                        'path' => $component->getMigrationsPath(),
                    ]
                );

                $files[$component->getName()] = $fileHandler->getPathFiles();
            }
        }

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

        return $this->shouldDiscoverEvents()
                    ? $this->discoverEvents()
                    : [];
    }
1010599
protected function getAllSourceFiles()
	{
		$files = array_merge(
			glob_recursive('build/*.php'),
			glob_recursive('src/*.php'),
			glob_recursive('tests/*.php'),
			glob('*.php')
		);

		sort($files);

		return $files;
	}
136331
private function getDatabaseStructureEvents()
    {
        // Listing all events from database
        if ($this->dumpSettings['events']) {
            foreach ($this->dbHandler->query($this->typeAdapter->show_events($this->dbName)) as $row) {
                array_push($this->events, $row['event_name']);
            }
        }
        return;
    }
145732
public function getFileList()
    {
        $allfiles = [];

        foreach ($this->filesets as $fs) {
            $ds = $fs->getDirectoryScanner($this->project);

            $files = $ds->getIncludedFiles();

            // We need to store these files keyed by the basedir from DirectoryScanner
            // so that we can resolve the fullpath of the file later.
            if (isset($allfiles[$ds->getBasedir()])) {
                $allfiles[$ds->getBasedir()] = array_merge($allfiles[$ds->getBasedir()], $files);
            } else {
                $allfiles[$ds->getBasedir()] = $files;
            }
        }

        $struc = [];

        foreach ($allfiles as $basedir => $files) {
            foreach ($files as $file) {
                // paths are relative to $basedir above
                $path = strtr(dirname($file), DIRECTORY_SEPARATOR, '/');

                if (!$path || $path == '.') {
                    $path = '/'; // for array index
                }

                $parts = explode('.', basename($file));
                $ext = array_pop($parts);
                if (strlen($ext) == strlen($file)) {
                    $ext = '';
                }

                $f = new PhingFile($basedir, $file);

                $struc[$path][] = [
                    'file' => basename($file),
                    'ext' => $ext,
                    'path' => (($path == '/') ? basename($file) : $path . '/' . basename($file)),
                    'fullpath' => $f->getAbsolutePath()
                ];
            }
        }

        uksort($struc, 'strnatcasecmp');
        foreach ($struc as $key => $ind) {
            usort($ind, [$this, 'sortfiles']);
            $struc[$key] = $ind;
        }

        $tempstruc = $struc;
        $struc = ['/' => $tempstruc['/']];
        $bv = 0;
        foreach ($tempstruc as $key => $ind) {
            $save = $key;
            if ($key != '/') {
                $struc['/'] = $this->setupDirs($struc['/'], explode('/', $key), $tempstruc[$key]);
            }
        }
        uksort($struc['/'], [$this, 'mystrucsort']);

        return $struc;
    }
1078047
public function getSubscribedEvents()
    {
        $secret = $this->getSecret();

        if (true === empty($secret)) {
            return [];
        }

        return [
            Events::postLoad,
            Events::onFlush,
        ];
    }
230083
public function getAllFiles()
    {
        $ext       = $this->formatter->getFileExtension();
        $filesystemIterator = new \FilesystemIterator($this->path, \FilesystemIterator::SKIP_DOTS);
        $files = new \RegexIterator($filesystemIterator, "/\\.{$ext}$/");

        return $files;
    }
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;
    }
472304
protected function getFiles()
    {
        if (!$this->files) {
            $files = array();
            if ($this->batch) {
                $files = $this->batch->getSessionVariable('files');
            } else {
                $files = $this->_session->files;
            }
            if (!is_array($files)) {
                $files = array();
            }
            $this->files = $files;
        }
        return $this->files;
    }
878849
public function allEvents(): array
    {
        $events = $this->iterableEvents();

        if ($this->endEvent && $this->responseEvent !== $this->endEvent) {
            $events[] = $this->endEvent;
        }

        if ($this->responseEvent) {
            array_unshift($events, $this->responseEvent);
        }

        array_unshift($events, $this->calledEvent);

        return $events;
    }
254554
private static function event()
    {
        $files = ['Event', 'EventListener'];
        $folder = static::$root.'Event'.'/';

        self::call($files, $folder);

        $files = ['ManyListenersArgumentsException'];
        $folder = static::$root.'Event/Exceptions'.'/';

        self::call($files, $folder);
    }
66124
protected function getEvents()
    {
        $events = [];

        foreach ($this->laravel->getProviders(EventServiceProvider::class) as $provider) {
            $providerEvents = array_merge($provider->discoverEvents(), $provider->listens());

            $events = array_merge_recursive($events, $providerEvents);
        }

        return $events;
    }
1146975
public function implementedEvents()
    {
        return [
            (string)EventName::APP_MODEL_GET_CALENDARS() => 'getPluginCalendars',
            (string)EventName::APP_MODEL_GET_EVENTS() => 'getPluginCalendarEvents',
            (string)EventName::PLUGIN_CALENDAR_MODEL_GET_CALENDARS() => 'sendGetCalendarsToApp',
            (string)EventName::PLUGIN_CALENDAR_MODEL_GET_EVENTS() => 'sendGetCalendarEventsToApp',
            (string)EventName::APP_ADD_EVENT() => 'addEvent',
        ];
    }
1285154
public function getModelFiles()
    {
        $files = [];

        foreach ($this->getOrm()->getComponents() as $component) {
            if ($component instanceof AppInterface) {
                $fileHandler = new FileHandler($component->getModelsPath());
                $files[$component->getName()] = $fileHandler->readDir('php');
            }
        }

        return $files;
    }
830112
public function getSubscribedEvents()
    {
        $events = [
            $this->command . '.resolve' => 'resolveDnsQuery',
            $this->command . '.resolver' => 'getResolverEvent',
        ];

        if ($this->enableCommand) {
            $events['command.' . $this->command] = 'handleDnsCommand';
        }

        return $events;
    }