VENOM-10: Moved to new Module Structure

Fixed File-Endings
Added Entity-System
This commit is contained in:
Maurice Grönwoldt 2021-01-03 16:59:11 +01:00
commit eb6770204a
101 changed files with 1272 additions and 892 deletions

View file

@ -1,18 +1,18 @@
<?php
use Venom\Core\Config;
use Venom\Core\DatabaseHandler;
use Venom\Core\Database\Database;
$config = Config::getInstance();
$config->setVersion(1.0);
$config->setDatabase([
DatabaseHandler::DB_TYPE => 'mysql', //please change only if you know what you're doing! this can break a lot.
DatabaseHandler::DB_HOST => '127.0.0.1',
DatabaseHandler::DB_PORT => '3306', //default port is 3306
DatabaseHandler::DB_USER => 'venom',
DatabaseHandler::DB_PASSWORD => 'venomPassword',
DatabaseHandler::DB_DB => 'venomCMS',
DatabaseHandler::DB_EXTRA => '' // need to start with ';'
Database::DB_TYPE => 'mysql', //please change only if you know what you're doing! this can break a lot.
Database::DB_HOST => '127.0.0.1',
Database::DB_PORT => '3306', //default port is 3306
Database::DB_USER => 'venom',
Database::DB_PASSWORD => 'venomPassword',
Database::DB_DB => 'venomCMS',
Database::DB_EXTRA => '' // need to start with ';'
]);
/**

0
base/lang.base.php Normal file → Executable file
View file

View file

@ -1,9 +1,4 @@
<?php
//register modules -> need to have the Module Class at parent with the init function ;)
$modules = [];
// register controllers that can handle templates ;) need to have a render function for this
$controllers = [
'test' => \Controllers\TestController::class,
];
//register modules -> only apply Module Path! like Meta now the ModuleLoader search for /modules/Meta/module.php!
$modules = [];

18
base/router.base.php Normal file → Executable file
View file

@ -11,19 +11,5 @@ if (!isset($venom)) {
exit(1);
}
$router = new Router('defaultRouter', 1.0, 'api/');
$router->addRoutes([
'/test' => [
'cl' => Route::class,
'roles' => ['ROLE_GUEST'],
'routes' => [
'*' => [
"GET" => 'getAll'
],
'1' => [
"GET" => 'getAll'
]
]
],
]);
$venom->addRouter('defaultRouter', $router);
$router = new Router(Router::DEFAULT_ROUTER, 1.0, 'api/');
$venom->addRouter($router);