Issues (16)

Labels
Severity
1
<?php
2
/**
3
 * Copyright (c) 2017
4
 *
5
 * @package   Majima
6
 * @author    David Neustadt <[email protected]>
7
 * @copyright 2017 David Neustadt
8
 * @license   MIT
9
 */
10
11
use Symfony\Component\HttpFoundation\Request;
12
use Majima\MajimaKernel;
13
14
const BASE_DIR = __DIR__ . DIRECTORY_SEPARATOR;
15
const VERSION = "0.1.0";
16
17
require_once(BASE_DIR . join(DIRECTORY_SEPARATOR, ['vendor', 'autoload.php']));
0 ignored issues
show
The constant BASE_DIR was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
18
19
$environment = getenv('MAJIMA_ENV') ? : 'prod';
20
21
if ($environment !== 'prod') {
22
    error_reporting(E_ALL);
23
    ini_set('display_errors', 'On');
24
}
25
26
$kernel = new MajimaKernel($environment, $environment !== 'prod');
27
$kernel->boot();
28
29
$request = Request::createFromGlobals();
30
31
$response = $kernel->handle($request);
32
33
$response->send();
34
$kernel->terminate($request, $response);