-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
app.php
35 lines (26 loc) · 832 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
32
33
34
35
<?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__,
'modules' => __DIR__ . '/app/modules',
'public' => __DIR__ . '/frontend/.output/public',
],
exceptionHandler: Handler::class,
)->run();
if ($app === null) {
exit(255);
}
$code = (int)$app->serve();
exit($code);