-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.php
executable file
·32 lines (26 loc) · 972 Bytes
/
application.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
<?php
require_once __DIR__ . '/constants.php';
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/application/bootstrap.php.cache';
require_once __DIR__ . '/application/AppKernel.php';
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* THIS FILE IS STIL THERE FOR LEGACY (NOT BASED ON INDEX.PHP) FILES
* IT'S COPYIED FROM INDEX.PHP
*/
/**
* Create Symfony kernel
*/
if (APPLICATION_ENV === 'production') {
$kernel = new AppKernel('prod', false);
} else if (APPLICATION_ENV === 'development' || APPLICATION_ENV === 'dev') {
$kernel = new AppKernel('dev', true);
} else {
$kernel = new AppKernel(APPLICATION_ENV, true);
}
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request, \Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST, false);
$response->send();
$kernel->terminate($request, $response);