X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=ef108ab6608e922bb9a2d9a6f921a6f0dc0632ec;hb=b78486390f6eda9a19815dfa96c0e759f40dde53;hp=ca598d09a38e399e38c126ba94ec54dc72459815;hpb=c3021952494266e05bfa9046baf9bcd11bfe7d13;p=core.git diff --git a/index.php b/index.php index ca598d09..ef108ab6 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,13 @@ 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 +192,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 +227,5 @@ define('DEVELOPER', TRUE); //xdebug_start_trace(); -// Do not remove the following line: +// Call above main() method ApplicationEntryPoint::main(); - -// [EOF] -?>