Making bin/daenerys more extensible
In order to make bin/daenerys more extensible and usable from outside with more configuration, the bootstrap of the game object has been moved to bin/daenerys where it is a closure stored in LotGD\Core\Console\Main. Commands now call Main::createGame() instead of Bootstrap::createGame(). Added the command database:init Merges #43 Closes #40
This commit is contained in:
+8
-1
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use LotGD\Core\Bootstrap;
|
||||
|
||||
function includeIfExists($file)
|
||||
{
|
||||
if (file_exists($file)) {
|
||||
@@ -13,4 +16,8 @@ includeIfExists(getcwd() . '/vendor/autoload.php') ||
|
||||
includeIfExists(__DIR__ . '/../vendor/autoload.php') ||
|
||||
includeIfExists(__DIR__ . '/../autoload.php');
|
||||
|
||||
LotGD\Core\Console\Main::main();
|
||||
$loader = function () {
|
||||
return Bootstrap::createGame();
|
||||
};
|
||||
|
||||
LotGD\Core\Console\Main::main($loader);
|
||||
|
||||
Reference in New Issue
Block a user