importer general
All checks were successful
Deploy / deploy-staging (push) Successful in 5s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-11 03:25:38 +02:00
parent 37f5b7f5e6
commit 067f962cb2
8 changed files with 277 additions and 25 deletions

View File

@@ -1,6 +1,9 @@
<?php
declare(strict_types=1);
use Modules\MiningChecker\Infrastructure\ConnectionFactory;
use Modules\MiningChecker\Infrastructure\ModuleConfig;
spl_autoload_register(static function (string $class): void {
$prefix = 'Modules\\MiningChecker\\';
if (!str_starts_with($class, $prefix)) {
@@ -14,3 +17,14 @@ spl_autoload_register(static function (string $class): void {
require_once $file;
}
});
$mm = isset($modules) && $modules instanceof App\ModuleManager ? $modules : modules();
$mm->registerFunction('mining-checker', 'sql_import_target', static function (): array {
$moduleBasePath = __DIR__;
$config = ModuleConfig::load($moduleBasePath);
return [
'pdo' => ConnectionFactory::make($config),
'label' => 'Mining-Checker Projekt-Datenbank',
];
});