X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=308cda9277dd63f3fef63dc86cdfbb6cf657b753;hb=9a24d448d6d5ed4a3d67997914272744f20aa7ef;hp=ebd9cba1dde5e71fe9d8797d27013e7c699d3106;hpb=75d22b262f62dd88e577ade6da3d6be9d34b9930;p=core.git diff --git a/index.php b/index.php index ebd9cba1..308cda92 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,14 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -68,7 +78,7 @@ final class ApplicationEntryPoint { } // END - if // Get some instances - $tpl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('web_template_class'); + $tpl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('html_template_class'); $languageInstance = LanguageSystem::getSelfInstance(); // Initialize template instance here to avoid warnings in IDE @@ -117,7 +127,7 @@ final class ApplicationEntryPoint { $applicationInstance = NULL; // Is the class there? - if (class_exists('ApplicationHelper')) { + if (class_exists('CoreFramework\Helper\Application\ApplicationHelper')) { // Get application instance $applicationInstance = ApplicationHelper::getSelfInstance(); @@ -150,7 +160,7 @@ final class ApplicationEntryPoint { // Flush the response $responseInstance->flushBuffer(); - } catch (FileIoException $e) { + } catch (FileNotFoundException $e) { // Even the template 'emergency_exit' wasn't found so output both message exit($message . ', exception: ' . $e->getMessage()); } @@ -183,27 +193,32 @@ final class ApplicationEntryPoint { } /** - * The application's main entry point. This class isolates some local + * The framework's main entry point. This class isolates some local * variables which shall not become visible to outside because of security - * concerns. We are doing this here to "emulate" the well-known entry - * point in Java. + * concerns. This is done here to "emulate" the well-known entry point in + * Java. * * @return void */ public static final function main () { - // Load config file + // Load config file, this provides $cfg require(self::detectCorePath() . '/inc/config.php'); + // Get a new configuration instance + $cfg = FrameworkConfiguration::getSelfInstance(); + + // Load bootstrap class + require($cfg->getConfigEntry('base_path') . 'inc/bootstrap/class_BootstrapFramework.php'); + + // ----- Below is deprecated ----- + // Load all include files require($cfg->getConfigEntry('base_path') . 'inc/includes.php'); - // Load all framework classes - require($cfg->getConfigEntry('base_path') . 'inc/classes.php'); - // Include the application selector require($cfg->getConfigEntry('base_path') . 'inc/selector.php'); - } // END - main() -} // END - class + } +} // Developer mode active? Comment out if no dev! define('DEVELOPER', TRUE); @@ -213,8 +228,5 @@ define('DEVELOPER', TRUE); //xdebug_start_trace(); -// Do not remove the following line: +// Call above main() method ApplicationEntryPoint::main(); - -// [EOF] -?>