X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=index.php;h=9f6a0e17e4db4680a6a36ff8ef325c20a1755962;hp=28703323c3017a63b02c9c713bbefb76032d6d29;hb=717829ec4b1f04e88e65838110d7cc8d9c4933c1;hpb=d26e71af1e28dc1429823bdec244df6303f9b2fb diff --git a/index.php b/index.php index 28703323..9f6a0e17 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,12 @@ 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 +125,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 +158,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 +191,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 +226,5 @@ define('DEVELOPER', TRUE); //xdebug_start_trace(); -// Do not remove the following line: +// Call above main() method ApplicationEntryPoint::main(); - -// [EOF] -?>