Restructure MVC into public/src layout

Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-24 14:00:58 +00:00
parent 1be6b7ff0c
commit f617ecb350
135 changed files with 75 additions and 63 deletions

55
src/Core/config.example.php Executable file
View File

@@ -0,0 +1,55 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
locale_set_default("fr_FR");
date_default_timezone_set("UTC"); // Default tz for date manipulation is UTC. Display tz is in session.php
/*****
** Management of folder names
*****/
$config['core_folder'] = rtrim(__DIR__, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
$config['src_folder'] = rtrim(dirname($config['core_folder']), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
$config['abs_root_folder'] = rtrim(dirname($config['src_folder']), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
$config['public_folder'] = $config['abs_root_folder']."public/";
// This is the relative folder to the root of the website from the DocumentRoot (can also be called subfolder)
$config['rel_root_folder'] = str_replace(rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR), "", rtrim($config['public_folder'], DIRECTORY_SEPARATOR));
$config['web_root_folder']="https://kabano.test/";
if($config['rel_root_folder']=="") {
$config['rel_root_folder']="/";
} else {
$config['rel_root_folder'] = "/".trim($config['rel_root_folder'],"/")."/";
}
// Here all the absolute paths to specific folders
$config['views_folder'] = $config['public_folder']."views/";
$config['controllers_folder'] = $config['src_folder']."controllers/";
$config['models_folder'] = $config['src_folder']."models/";
$config['medias_folder'] = $config['public_folder']."medias/";
$config['includes_folder'] = $config['core_folder'];
$config['third_folder'] = $config['src_folder']."Thirds/";
$config['logs_folder'] = $config['abs_root_folder']."logs/";
// Here all the relative url to specific folders
$config['views_url'] = $config['rel_root_folder']."views/";
/*****
** SQL Database configuration
*****/
$config['SQL_host'] = "localhost";
$config['SQL_user'] = "kabano";
$config['SQL_pass'] = "PASSWORD";
$config['SQL_db'] = "postgres";
/*****
** Mail configuration
*****/
$config['admin_mail'] = "leo@lstronic.com";
$config['bot_mail'] = "robot@kabano.com";