- // Load config file, this no longer provides $cfg
- require(self::detectCorePath() . '/framework/config.php');
-
- // Get a new configuration instance
- $cfg = FrameworkConfiguration::getSelfInstance();
-
- // Load bootstrap class
- require($cfg->getConfigEntry('base_path') . 'framework/bootstrap/class_BootstrapFramework.php');
-
- // ----- Below is deprecated -----
-
- // Load all include files
- require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
-
- // Include the application selector
- require($cfg->getConfigEntry('base_path') . 'framework/selector.php');
+ // Load bootstrap file
+ require sprintf('%sbootstrap%sbootstrap.inc.php', self::detectFrameworkPath(), DIRECTORY_SEPARATOR);
+
+ /*
+ * Initial bootstrap is done, continue with initialization of
+ * framework.
+ */
+ FrameworkBootstrap::initFramework();
+
+ // Next initialize the detected application
+ FrameworkBootstrap::prepareApplication();
+
+ /*
+ * Last step is to start the application, this will also initialize and
+ * register the application instance in registry.
+ */
+ FrameworkBootstrap::startApplication();