diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-12 07:16:23 +0200 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-12 07:16:23 +0200 |
| commit | 7076343338ae3439f3c86f01144818abe8c31978 (patch) | |
| tree | 794abb1e6b8f821091fd095341885496b6dad51d /config/anom_settings.php | |
| parent | 47cbb529f5723b246125ae083a193e11481b89ef (diff) | |
| download | classroom-7076343338ae3439f3c86f01144818abe8c31978.tar.gz classroom-7076343338ae3439f3c86f01144818abe8c31978.tar.bz2 classroom-7076343338ae3439f3c86f01144818abe8c31978.zip | |
add container helpers; constuct public directory-tree
Diffstat (limited to 'config/anom_settings.php')
| -rw-r--r-- | config/anom_settings.php | 169 |
1 files changed, 0 insertions, 169 deletions
diff --git a/config/anom_settings.php b/config/anom_settings.php deleted file mode 100644 index 882145d..0000000 --- a/config/anom_settings.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php -/** CONFIGURATION PATAMETRES - * --- - * This is the first file you need to setup - * in order to start a new application - */ - -// DEFINE WHETTHER THE APP RUNS ON PRODUCTION -// Don't forget to change this setting -// when deploying to a different stage -// ----------------------------------------------------------------------------- -// define by OS parameter -//// if (getenv('ENVIRONMENT')) { -//// if (getenv('ENVIRONMENT') == 'PRODUCTION') { -//// -//// define('PRODUCTION', true); -//// -//// } else { -//// define('PRODUCTION', false); -//// } -//// } -//// // define by .env file -//// if (!defined('PRODUCTION')) { -//// if (file_exists('../core/auth/.env')) { -//// $ini_array = parse_ini_file("../core/auth/.env"); -//// -//// define('PRODUCTION', $ini_array['ENVIRONMENT']); -//// } -//// } else { -//// define('PRODUCTION', false); // or define manualy -//// } -define('PRODUCTION', false); - - -// Custom Names //////////////////////////////////////////////////////////////// -// ----------------------------------------------------------------------------- - -define('APP_NAME', 'e-Classroom'); // Application Name - -define('APP_VERSION', 'v0.2'); // Application version - -define('SESSION_NAME', 'clroom'); // Session Name - - - -// APPLICATION PATHS /////////////////////////////////////////////////////////// -// ----------------------------------------------------------------------------- - -// Obligarory -// These are needed in order to run the bare minimum MVC system -// They also make code easier to read -// -// NOTE: probably you don't need to chage these defines -// ----------------------------------------------------------------------------- - -define('APP_ROOT', dirname(get_included_files()[0]) ); - -define('URL_ROOT', '/'); - -define('CREDENTIALS', '../core/config/credentials.php'); - -define('INIT_APPLICATION', '../core/config/init.php'); - -define('RENDERING_SYSTEM', '../core/helpers/render.php'); - -// default: define('VIEWS_DIRECTORY', APP_ROOT.'/app/views/'); -define('VIEWS_DIRECTORY', APP_ROOT.'/processed-views/'); - -define('TESTS_DIRECTORY', APP_ROOT."/../tests/"); - - -// AUTOLOADER ////////////////////////////////////////////////////////////////// -// ----------------------------------------------------------------------------- - -// An autoloader for classes is required; -// OPTION 1: COMPOSER -// Composer is recommended and makes much more than simple autoloding -define('AUTOLOADER' , '../vendor/autoload.php'); - -// OPTION 2: Custom Autoloader -// If Composer is not supported, another autoloading proccess required -// Comment/Disable the 1st option and uncomment/Enable the next line -# define('AUTOLOADER' , '../core/helpers/autoload.php'); - -// CLASSPATHS : array of paths where classes are saved -// Needed only when the custom autoloader is used -// (like autoload.classmap section of Composer) -# define('CLASSPATHS', array( -# '/../core/classes/', -# '/app/controllers/', -# '/app/models/', -# '/../vendor/' -# ) -# ); - - - -// 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', 'FileCache'); - -// Caching expiration times fpr various expensive objects -// ----------------------------------------------------------------------------- - -// Root objects like product-categories tree -define('CACHE_ROOT_TTL', 28800); // 8 hours - -// Product Category -define('CACHE_CATEGORY_TTL', 18000); // 5 hours - -// Product -define('CACHE_PRODUCT_TTL', 3600); // 1 hour - - -// SESSION_DRIVER ; accepted values... -// 'files' : (defult) php uses filesystem for saving session; fair if caching in SSD drive -// 'redis' : keep sessions in a Redis server; rapid-fast but wastes large amount of RAM -// 'database' : keep session data in Database; ideal for session across multiple servers -// ----------------------------------------------------------------------------- - -define('SESSION_DRIVER', 'files'); - -// CONNECTIONS ... - -define('FILECACHE_PATH', APP_ROOT.'/cache/'); // if CACHE_DRIVER is set to 'FileCache' - -# 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' - - - - -// SECURITY SETTINGS /////////////////////////////////////////////////////////// -// ----------------------------------------------------------------------------- - -// Cross Site Request Forgery -// --- -// Enables a CSRF cookie token to be set. When set to TRUE, token will be -// checked on a submitted form. If you are accepting user data, it is strongly -// recommended CSRF protection be enabled. -// ----------------------------------------------------------------------------- - -define('CSRF_PROTCTION', false); - -define('CSRF_TOKEN_NAME', 'csrf_test_name'); // token name - -define('CSRF_COOKIE_NAME', 'csrf_cookie_name'); // cookie name - -define('CSRF_EXPIRE', 7200); // The number in seconds the token should expire. - -define('CSRF_REGENERATE', TRUE); // Regenerate token on every submission - -define('CSRF_EXCLUDE_URIS', array()); // Array of URIs which ignore CSRF checks |
