45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* CodeIgniter 4 Boot file
|
|
*/
|
|
|
|
use CodeIgniter\Boot;
|
|
use Config\Paths;
|
|
|
|
/*
|
|
* ---------------------------------------------------------------
|
|
* SETUP OUR PATH CONSTANTS
|
|
* ---------------------------------------------------------------
|
|
*/
|
|
|
|
// Ensure $paths is available
|
|
if (! isset($paths)) {
|
|
$paths = new Paths();
|
|
}
|
|
|
|
// Define ROOTPATH
|
|
defined('ROOTPATH') || define('ROOTPATH', realpath($paths->appDirectory . '/..') . DIRECTORY_SEPARATOR);
|
|
|
|
// Path to the application directory
|
|
defined('APPPATH') || define('APPPATH', realpath($paths->appDirectory) . DIRECTORY_SEPARATOR);
|
|
|
|
// Path to the public directory
|
|
defined('PUBLICPATH') || define('PUBLICPATH', realpath($paths->publicDirectory) . DIRECTORY_SEPARATOR);
|
|
|
|
// Path to the writable directory
|
|
defined('WRITEPATH') || define('WRITEPATH', realpath($paths->writableDirectory) . DIRECTORY_SEPARATOR);
|
|
|
|
// Path to the tests directory
|
|
defined('TESTPATH') || define('TESTPATH', realpath($paths->testsDirectory) . DIRECTORY_SEPARATOR);
|
|
|
|
/*
|
|
* ---------------------------------------------------------------
|
|
* GRAB THE CODEIGNITER BOOT CLASS
|
|
* ---------------------------------------------------------------
|
|
*/
|
|
|
|
require ROOTPATH . 'vendor/codeigniter4/framework/system/Boot.php';
|
|
|
|
return Boot::bootWeb($paths);
|