2020-05-27 18:46:16 +02:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-05-14 17:59:35 +00:00
|
|
|
use Config\Paths;
|
|
|
|
|
2020-05-27 18:46:16 +02:00
|
|
|
// Path to the front controller (this file)
|
|
|
|
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
|
|
|
|
|
|
|
|
/*
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* BOOTSTRAP THE APPLICATION
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* This process sets up the path constants, loads and registers
|
|
|
|
* our autoloader, along with Composer's, loads our constants
|
|
|
|
* and fires up an environment-specific bootstrapping.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Ensure the current directory is pointing to the front controller's directory
|
|
|
|
chdir(__DIR__);
|
|
|
|
|
|
|
|
// Load our paths config file
|
2021-04-02 17:20:02 +00:00
|
|
|
// This is the line that might need to be changed, depending on your folder structure.
|
2021-06-08 09:52:11 +00:00
|
|
|
$pathsConfig = FCPATH . '../app/Config/Paths.php';
|
|
|
|
// ^^^ Change this if you move your application folder
|
|
|
|
require realpath($pathsConfig) ?: $pathsConfig;
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-05-14 17:59:35 +00:00
|
|
|
$paths = new Paths();
|
2020-05-27 18:46:16 +02:00
|
|
|
|
|
|
|
// Location of the framework bootstrap file.
|
2021-05-25 10:40:22 +00:00
|
|
|
$bootstrap = rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
|
2021-04-02 17:20:02 +00:00
|
|
|
$app = require realpath($bootstrap) ?: $bootstrap;
|
2020-05-27 18:46:16 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* LAUNCH THE APPLICATION
|
|
|
|
*---------------------------------------------------------------
|
|
|
|
* Now that everything is setup, it's time to actually fire
|
|
|
|
* up the engines and make this app do its thang.
|
|
|
|
*/
|
|
|
|
$app->run();
|