-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
36 lines (27 loc) · 934 Bytes
/
index.php
File metadata and controls
36 lines (27 loc) · 934 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
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licensing details.
*/
use ACP3\Core\Application\Bootstrap;
use ACP3\Core\Environment\ApplicationMode;
use Symfony\Component\HttpFoundation\Request;
\define('ACP3_ROOT_DIR', realpath(__DIR__));
require ACP3_ROOT_DIR . '/vendor/autoload.php';
$request = Request::createFromGlobals();
$appMode = ApplicationMode::PRODUCTION;
if (getenv('ACP3_APPLICATION_MODE') === ApplicationMode::DEVELOPMENT->value) {
$appMode = ApplicationMode::DEVELOPMENT;
}
$kernel = new Bootstrap($appMode);
if (!$kernel->isInstalled()) {
echo <<<HTML
The ACP3 is not correctly installed.
Please navigate to the <a href="{$request->getBasePath()}/installation/">installation wizard</a>
and follow its instructions.
HTML;
exit;
}
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);