php-hotfix/bin/bootstrap.php

33 lines
743 B
PHP
Raw Normal View History

2016-04-19 13:54:03 +00:00
<?php
define("APP_VERSION", "0.1-pre");
2016-04-19 13:54:03 +00:00
require_once __DIR__."/../vendor/autoload.php";
require_once __DIR__."/systemtest.php";
2016-04-19 20:55:09 +00:00
if (file_exists(__DIR__."/banner.php"))
require_once __DIR__."/banner.php";
2016-04-19 13:54:03 +00:00
use NoccyLabs\Hotfix\Hotfix\AliasManager;
use NoccyLabs\Hotfix\Service\ServiceManager;
use NoccyLabs\Hotfix\Service;
2016-04-19 13:54:03 +00:00
use NoccyLabs\Hotfix\HotfixApplication;
// Register services
ServiceManager::registerService(new Service\IxService());
// Register aliases
$paths = [
getenv("HOME")."/.hotfix.conf",
"/etc/hotfix.conf"
];
foreach ($paths as $path) {
if (file_exists($path)) {
AliasManager::registerFromConfig($path);
break;
}
}
// Start the application
2016-04-19 13:54:03 +00:00
$app = new HotfixApplication();
$app->run();