public static function initialize() { // Don't overwrite anything....
if (static::
$initialized) { return;
} $config =
config(Modules::
class);
$events = APPPATH . 'Config' . DIRECTORY_SEPARATOR . 'Events.php';
$files =
[];
if ($config->
shouldDiscover('events'
)) { $files = Services::
locator()->
search('Config/Events.php'
);
} $files =
array_filter(array_map(static function Dstring
$file) { if (is_file($file)) { return realpath($file) ?:
$file;
} return false; // @codeCoverageIgnore
},
$files));