Inital commit

This commit is contained in:
2020-11-19 15:36:28 +01:00
parent 71f32f83d3
commit 66ce4ee218
18077 changed files with 2166122 additions and 35184 deletions

View File

@@ -2,7 +2,39 @@
if (php_sapi_name() != 'cli') {
throw new \Exception('this script can only be launched with cli sapi');
}
require __DIR__ . '/../core/bootstrap.php';
$bootstrapToggle = false;
$bootstraped = false;
// Autoload bootstrap
foreach ($argv as $arg) {
if ($arg === '-b') {
$bootstrapToggle = true;
continue;
}
if ($bootstrapToggle) {
require __DIR__ . DIRECTORY_SEPARATOR . $arg;
$bootstraped = true;
}
}
if (!$bootstraped) {
if (isset($bootstrapFile)) {
require $bootstrapFile;
} elseif (is_file($file = __DIR__ . '/../core/vendor/autoload.php')) {
require $file;
} elseif (is_file($file = __DIR__ . '/../../bootstrap.php')) {
// Here we are on a thelia/thelia-project
require $file;
} else {
echo "No autoload file found. Please use the -b argument to include yours";
exit(1);
}
}
$thelia = new Thelia\Core\Thelia("dev", true);
$thelia->boot();