-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.php
More file actions
36 lines (27 loc) · 847 Bytes
/
app.php
File metadata and controls
36 lines (27 loc) · 847 Bytes
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
36
<?php
declare(strict_types=1);
use App\Application\Kernel;
use Spiral\Core\Container;
use Spiral\Core\Options;
// 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_DEPRECATED);
\ini_set('display_errors', 'stderr');
// Register Composer's auto loader.
require __DIR__ . '/vendor/autoload.php';
// Initialize shared container, bindings, directories and etc.
$options = new Options();
$options->allowSingletonsRebinding = false;
$options->validateArguments = false;
$container = new Container(options: $options);
$app = Kernel::create(
directories: ['root' => __DIR__],
container: $container,
)->run();
if ($app === null) {
exit(255);
}
$code = (int) $app->serve();
exit($code);