summaryrefslogtreecommitdiff
path: root/public/index.php
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
commit059e0d95d0c28bc5060e87e146eaf7411f51bf90 (patch)
tree7c21ac432f16dde2329a0d5954d70711eceb48e6 /public/index.php
parent26cd8ee99659ef1926c96a049c93645ffc9b169d (diff)
downloadgyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.gz
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.bz2
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.zip
skeleton commit; based on an anom project
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/public/index.php b/public/index.php
new file mode 100644
index 0000000..92b825a
--- /dev/null
+++ b/public/index.php
@@ -0,0 +1,63 @@
+<?php
+/** anom
+ * ANOther MVC framefork ///////////////////////////////////////////////////////
+ * -----------------------------------------------------------------------------
+ * This is where the whole thing stats.
+ * Let's keep it simple and clear
+ *
+ * anom is an Object-Oriented MVC php-framework.
+ * It is super-light, fast and extensible.
+ * Contains almost anything you need to start
+ * and optimize a server-based web-application.
+ * And as long as you write code using secure practices,
+ * it will be secure.
+ *
+ * Copyleft: George Halkiadalos
+ * Licence: BSD
+ * \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
+ * -----------------------------------------------------------------------------
+ */
+// Load parametres:
+// contants and constant arrays
+// -----------------------------------------------------------------------------
+
+require_once '../core/config/constants.php'; // general constants
+
+require_once '../core/config/anom_settings.php'; // core framework constants
+
+require_once 'app/config/app_constants.php'; // application constants
+
+
+
+// Enable Autoloader
+// -----------------------------------------------------------------------------
+require_once AUTOLOADER;
+
+
+// Enable sessions
+// -----------------------------------------------------------------------------
+$session = new (SESSION_DRIVER)(); // Start a new session
+
+
+// prepare output control and benchmarking
+// -----------------------------------------------------------------------------
+ob_start(); // handle output
+if (!PRODUCTION) Benchmark::add_spot('start'); // benchmark request's life
+
+
+// Initialize Application
+// finalize framework; handle credentials; setup app-engine; insert routes
+// -----------------------------------------------------------------------------
+
+require_once INIT_APPLICATION;
+
+
+// Application is ready!
+// -----------------------------------------------------------------------------
+
+Route::run(Registry::get('REQUEST')); // Run baby, run!
+
+
+if (!PRODUCTION) Benchmark::add_spot('end'); // request ended
+if (!PRODUCTION) Benchmark::render_report(); // echo benchmark report
+ob_flush(); // flush output