X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=b399a6a35b9e4c377477f7db7ed2358491976323;hb=7756c313e101f012af9c3ccfc378308f4f03f603;hp=851f50002b47c015102cdefe2df3d8a54e8c42d7;hpb=c13ca7c93ee55b02d1d3320fca5d2d8d6e953768;p=hub.git
diff --git a/index.php b/index.php
index 851f50002..b399a6a35 100644
--- a/index.php
+++ b/index.php
@@ -32,20 +32,6 @@ final class ApplicationEntryPoint {
*/
private static $corePath = '';
- /**
- * The instances we want to remove after all is done
- */
- private static $instances = array (
- 'cfg', // The configuration system
- 'loader', // The class loader system
- 'debug', // Debug output
- 'db', // Database layer
- 'io', // Base I/O system (local file [or network])
- 'engine', // Template engine ( for ApplicationEntryPoint::app_die() )
- 'lang', // Language sub-system
- 'app', // The ApplicationHelper instance
- );
-
/**
* The application's emergency exit
*
@@ -56,29 +42,29 @@ final class ApplicationEntryPoint {
* @return void
* @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper
*/
- public static final function app_die ($message = '', $code = false, $extraData = '', $silentMode = false) {
+ public static final function app_exit ($message = '', $code = FALSE, $extraData = '', $silentMode = FALSE) {
// Is this method already called?
if (isset($GLOBALS['app_die_called'])) {
// Then output the text directly
- die($message);
+ exit($message);
} // END - if
// This method shall not be called twice
- $GLOBALS['app_die_called'] = true;
+ $GLOBALS['app_die_called'] = TRUE;
// Is a message set?
if (empty($message)) {
// No message provided
- $message = 'No message provided!';
+ $message = 'No message provided.';
} // END - if
// Get config instance
$configInstance = FrameworkConfiguration::getSelfInstance();
// Do we have debug installation?
- if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) {
+ if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === TRUE)) {
// Abort here
- die();
+ exit();
} // END - if
// Get some instances
@@ -98,7 +84,7 @@ final class ApplicationEntryPoint {
// Get the template instance from our object factory
$templateInstance = ObjectFactory::createObjectByName($tpl);
} catch (FrameworkException $e) {
- die(sprintf("[Main:] Could not initialize template engine for reason: %s",
+ exit(sprintf("[Main:] Could not initialize template engine for reason: %s",
$e->getMessage()
));
}
@@ -166,14 +152,14 @@ final class ApplicationEntryPoint {
$responseInstance->flushBuffer();
} catch (FileIoException $e) {
// Even the template 'emergency_exit' wasn't found so output both message
- die($message . ', exception: ' . $e->getMessage());
+ exit($message . ', exception: ' . $e->getMessage());
}
// Good bye...
exit();
} else {
// Output message and die
- die(sprintf("[Main:] Emergency exit reached: %s",
+ exit(sprintf('[Main:] Emergency exit reached: %s',
$message
));
}
@@ -220,10 +206,10 @@ final class ApplicationEntryPoint {
} // END - class
// Developer mode active? Comment out if no dev!
-define('DEVELOPER', true);
+define('DEVELOPER', TRUE);
// Log all exceptions (only debug! This option can create large error logs)
-//define('LOG_EXCEPTIONS', true);
+//define('LOG_EXCEPTIONS', TRUE);
//xdebug_start_trace();