From 59cd40235bf4746a119421609b25d7e9b7f65f83 Mon Sep 17 00:00:00 2001 From: Geo Halkiadakis Date: Mon, 15 May 2023 18:15:37 +0300 Subject: refactoring framework defaults --- core/config/anom_settings.php | 209 -------------------------------------- core/config/constants.php | 28 ----- core/config/init.php | 11 +- core/config/xx--anom_settings.php | 66 ++++++++++++ core/config/xx--constants.php | 28 +++++ 5 files changed, 97 insertions(+), 245 deletions(-) delete mode 100644 core/config/anom_settings.php delete mode 100644 core/config/constants.php create mode 100644 core/config/xx--anom_settings.php create mode 100644 core/config/xx--constants.php (limited to 'core/config') diff --git a/core/config/anom_settings.php b/core/config/anom_settings.php deleted file mode 100644 index 03e4cc5..0000000 --- a/core/config/anom_settings.php +++ /dev/null @@ -1,209 +0,0 @@ - 'text/html; charset=UTF-8', - 'html' => 'text/html; charset=UTF-8', - 'json' => 'application/json; charset=utf-8', - 'js' => 'application/javascript; charset=utf-8', - 'css' => 'text/css', - 'png' => 'image/png', - 'jpeg' => 'image/jpeg', - 'webp' => 'image/web' - ) -); - - -// PROXY_FLAGS -// ----------------------------------------------------------------------------- -// These options represend altered/non-default behaviour -// and will be resolved bitwise, so use powers of 2 -// ----------------------------------------------------------------------------- -define('PROXY_CACHE_ERRORS', 1); // cache result even if error -define('PROXY_IGNORE_CACHE', 2); // ignore cache if exist -define('PROXY_DO_NOT_CACHE', 4); // do not cache result diff --git a/core/config/init.php b/core/config/init.php index 589a486..40624d3 100644 --- a/core/config/init.php +++ b/core/config/init.php @@ -18,14 +18,9 @@ // setup error-handliing // ----------------------------------------------------------------------------- -require_once '../core/helpers/error_handling.php'; +require_once APP_ROOT.'/core/helpers/error_handling.php'; -// depricated: -/// // Load rendering sub-system -/// // ----------------------------------------------------------------------------- -/// require_once RENDERING_SYSTEM; - // Setup Application Engiine // ----------------------------------------------------------------------------- @@ -55,10 +50,10 @@ Registry::set('REQUEST', new Request()); // (these patterns use some of the project's central objects (Registry, // Cache, Database), so laod them after. // ----------------------------------------------------------------------------- -require_once '../core/helpers/design_patterns.php'; +require_once APP_ROOT.'/core/helpers/design_patterns.php'; // Add Routes // ----------------------------------------------------------------------------- -require_once 'app/config/init_routes.php'; // initialize routes +require_once WEB_ROOT.'/app/config/init_routes.php'; // initialize routes diff --git a/core/config/xx--anom_settings.php b/core/config/xx--anom_settings.php new file mode 100644 index 0000000..06fe5af --- /dev/null +++ b/core/config/xx--anom_settings.php @@ -0,0 +1,66 @@ + 'text/html; charset=UTF-8', + 'html' => 'text/html; charset=UTF-8', + 'json' => 'application/json; charset=utf-8', + 'js' => 'application/javascript; charset=utf-8', + 'css' => 'text/css', + 'png' => 'image/png', + 'jpeg' => 'image/jpeg', + 'webp' => 'image/web' + ) +); + + +// PROXY_FLAGS +// ----------------------------------------------------------------------------- +// These options represend altered/non-default behaviour +// and will be resolved bitwise, so use powers of 2 +// ----------------------------------------------------------------------------- +define('PROXY_CACHE_ERRORS', 1); // cache result even if error +define('PROXY_IGNORE_CACHE', 2); // ignore cache if exist +define('PROXY_DO_NOT_CACHE', 4); // do not cache result -- cgit v1.2.3