summaryrefslogtreecommitdiff
path: root/core/config
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-05-16 02:48:50 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-05-16 02:48:50 +0300
commitb49941608a8d37ca6bedf2529a703876530124d4 (patch)
treeecdef8a36a36f495fe996606729bb1db3023d156 /core/config
parent59cd40235bf4746a119421609b25d7e9b7f65f83 (diff)
downloadgyraf1gov-b49941608a8d37ca6bedf2529a703876530124d4.tar.gz
gyraf1gov-b49941608a8d37ca6bedf2529a703876530124d4.tar.bz2
gyraf1gov-b49941608a8d37ca6bedf2529a703876530124d4.zip
anom refactoring; remove noisy depricated files
Diffstat (limited to 'core/config')
-rw-r--r--core/config/init.php59
-rw-r--r--core/config/xx--anom_settings.php66
-rw-r--r--core/config/xx--constants.php28
3 files changed, 0 insertions, 153 deletions
diff --git a/core/config/init.php b/core/config/init.php
deleted file mode 100644
index 40624d3..0000000
--- a/core/config/init.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-/** initialize System
- * ---
- * Finalalize the MVC framework and construct the central objects
- * (Registry and Request)
- *
- * Include _anything_ that is common practice on the request life-cycle
- * of your project and does not need to be shown in the /public/index.php
- * Usualy here you shall initialize supplamentary services like Sessions
- * / Database / Caching etc.
- *
- * NOTE:
- * Always try to keep the app as light as possible, so load only what is
- * critical for the MVC to operate;
- * anything else can be injected on-demand
- */
-
-// setup error-handliing
-// -----------------------------------------------------------------------------
-require_once APP_ROOT.'/core/helpers/error_handling.php';
-
-
-
-// Setup Application Engiine
-// -----------------------------------------------------------------------------
-// Setup supplementary services (derectry or as promises/vows)
-// Session, Database, Caching
-
-
-// Attache database to the Regostry a vow
-Registry::vow('database', function() { return new Database(); });
-
-
-// Attach Cache to the Resitry as a vow
-// (CACHE_DRIVER) acts as driver-wrapper
-// --- -- -- - - -
-Registry::vow('cache', function() { return new (CACHE_DRIVER)(); });
-// CHECK: if strict mode has any benefits:
-// Registry::vow('cache', function():Cache_interface { return new (CACHE_DRIVER)(); });
-
-
-// Initialize THE REQUEST
-// -----------------------------------------------------------------------------
-Registry::set('REQUEST', new Request());
-
-
-
-// load design-patterns
-// (these patterns use some of the project's central objects (Registry,
-// Cache, Database), so laod them after.
-// -----------------------------------------------------------------------------
-require_once APP_ROOT.'/core/helpers/design_patterns.php';
-
-
-// Add 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
deleted file mode 100644
index 06fe5af..0000000
--- a/core/config/xx--anom_settings.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/* ADVANCED OPTIMIZATION ///////////////////////////////////////////////////////
- * -----------------------------------------------------------------------------
- *
- * APP_CACHE defines the cache-driver;
- * accepted values are the name of the Cache-interface impementations (the exact
- * names of the classes)
- *
- * 'FileCache' : caching in filesystem; fair if caching on HDD; great on SSD
- * 'RedisCache' : caching in Redis server; generally recommended if available
- * 'MemCachedCache' : caching in Memcached server; recommended if available
- *
- * NOTE: FileCache on a NVMe SDD is the fastest option;
- * Redis and Memcached are really-fast caching options and are available for
- * scaling horizontaly your application (eache one has it's own strngths;
- * study, then choose the one that fulfills your needs;
- * -----------------------------------------------------------------------------
- */
-
-define('CACHE_DRIVER', $env['CACHE_DRIVER'] ?? 'FileCache');
-
-
-
-
-/** HOTFIX: (needs refactoring) */
-
-// CONNECTIONS ...
-
-define('FILECACHE_PATH', APP_ROOT.'/storage/cache/'); // if CACHE_DRIVER is set to 'FileCache'
-
-define('MEDIA_STORAGE_ROOT', APP_ROOT.'/storage/uploads/'); // Media files root directory
-
-# define('REDIS_HOST', '127.0.0.1'); // if CACHE_DRIVER is set to 'RedisCache'
-
-# define('MEMCAHCED_SERVER', '127.0.0.1'); // if CACHE_DRIVER is set to 'MemCached'
-
-
-
-
-/** CREDENTIALS
- * -----------------------------------------------------------------------------
- */
-
- \ No newline at end of file
diff --git a/core/config/xx--constants.php b/core/config/xx--constants.php
deleted file mode 100644
index d2ecc41..0000000
--- a/core/config/xx--constants.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/** Constants
- * ---
- */
-
-// COMMON CONTENT TYPES
-// -----------------------------------------------------------------------------
-define('COMMON_CONTENT_TYPES', array(
- 'text' => '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