X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=index.php;h=b54c766135e0d55fd599451842699bb3280acb6a;hp=51eb50ef9341ef86cdff5c5f4a9b4023502e5024;hb=68760af646a51cf18bd0e6e11e0ebfdeb324e0d2;hpb=ce7d4f1ec37db463e6008655bbc56b811c5a5d86 diff --git a/index.php b/index.php index 51eb50ef..b54c7661 100644 --- a/index.php +++ b/index.php @@ -150,7 +150,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,24 +183,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'); // 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); @@ -210,7 +218,7 @@ define('DEVELOPER', TRUE); //xdebug_start_trace(); -// Do not remove the following line: +// Call above main() method ApplicationEntryPoint::main(); // [EOF]