forked from spiral/app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.php
31 lines (22 loc) · 712 Bytes
/
app.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
27
28
29
30
31
<?php
declare(strict_types=1);
use App\Application\Kernel;
use App\Application\Service\ErrorHandler\Handler;
// If you forgot to configure some of this in your php.ini file,
// then don't worry, we will set the standard environment
// settings for you.
\mb_internal_encoding('UTF-8');
\error_reporting(E_ALL | E_STRICT ^ E_DEPRECATED);
\ini_set('display_errors', 'stderr');
// Register Composer's auto loader.
require __DIR__ . '/vendor/autoload.php';
// Initialize shared container, bindings, directories and etc.
$app = Kernel::create(
directories: ['root' => __DIR__],
exceptionHandler: Handler::class,
)->run();
if ($app === null) {
exit(255);
}
$code = (int)$app->serve();
exit($code);