feat: Rewrite of the core: avoid globals where possible

Create services for: login, status, router, database, AnonymousStatistics
Drop gesior.backward_support
Drop compat/pages.php
Drop part of compat/classes.php
Move signature to routes
This commit is contained in:
slawkens
2025-03-09 14:41:41 +01:00
parent 3c1210fefa
commit 2c59c4d8f7
35 changed files with 1054 additions and 1174 deletions

33
aac
View File

@@ -3,34 +3,5 @@
require_once __DIR__ . '/common.php';
if(!IS_CLI) {
echo 'This script can be run only in command line mode.';
exit(1);
}
require_once SYSTEM . 'functions.php';
define('SELF_NAME', basename(__FILE__));
use MyAAC\Plugins;
use Symfony\Component\Console\Application;
$application = new Application('MyAAC', MYAAC_VERSION);
$commandsGlob = glob(SYSTEM . 'src/Commands/*.php');
foreach ($commandsGlob as $item) {
$name = pathinfo($item, PATHINFO_FILENAME);
if ($name == 'Command') { // ignore base Command class
continue;
}
$commandPre = '\\MyAAC\Commands\\';
$application->add(new ($commandPre . $name));
}
$pluginCommands = Plugins::getCommands();
foreach ($pluginCommands as $item) {
$application->add(require $item);
}
$application->run();
$console = new \MyAAC\App\Console();
$console->run();