77aab6f9cb
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
24 lines
559 B
PHP
Executable File
24 lines
559 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use LotGD\Core\Bootstrap;
|
|
|
|
function includeIfExists($file)
|
|
{
|
|
if (file_exists($file)) {
|
|
return include $file;
|
|
}
|
|
}
|
|
|
|
// Dance to find the autoloader.
|
|
// TOOD: change this to open up the Composer config and use $c['config']['vendor-dir'] instead of "vendor"
|
|
includeIfExists(getcwd() . '/vendor/autoload.php') ||
|
|
includeIfExists(__DIR__ . '/../vendor/autoload.php') ||
|
|
includeIfExists(__DIR__ . '/../autoload.php');
|
|
|
|
$loader = function () {
|
|
return Bootstrap::createGame();
|
|
};
|
|
|
|
LotGD\Core\Console\Main::main($loader);
|