-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbootstrap.php
26 lines (26 loc) · 998 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
* This file is part of Notadd.
* @author TwilRoad <[email protected]>
* @copyright (c) 2015, iBenchu.org
* @datetime 2015-10-16 21:38
*/
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
use Illuminate\Contracts\Http\Kernel as HttpKernelContract;
use Notadd\Foundation\Application;
use Notadd\Foundation\Console\Kernel as ConsoleKernel;
use Notadd\Foundation\Http\Kernel as HttpKernel;
use Notadd\Foundation\Install\Kernel as InstallKernel;
use Notadd\Foundation\Exceptions\Handler;
define('NOTADD_START', microtime(true));
require __DIR__ . '/vendor/autoload.php';
$app = new Application(realpath(__DIR__));
if($app->isInstalled()) {
$app->singleton(HttpKernelContract::class, HttpKernel::class);
$app->singleton(ExceptionHandler::class, Handler::class);
} else {
$app->singleton(HttpKernelContract::class, InstallKernel::class);
$app->singleton(ExceptionHandler::class, Handler::class);
}
return $app;