]> git.mxchange.org Git - hub.git/blobdiff - index.php
Added line numbers to debug lines as this will become the 'norm'
[hub.git] / index.php
index 851f50002b47c015102cdefe2df3d8a54e8c42d7..1202b317fb7823dbb37a00c61e5a2c90ed041bc7 100644 (file)
--- 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,11 +42,11 @@ 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
@@ -78,7 +64,7 @@ final class ApplicationEntryPoint {
                // Do we have debug installation?
                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: <span class=\"exception_reason\">%s</span>",
+                               exit(sprintf("[Main:] Could not initialize template engine for reason: <span class=\"exception_reason\">%s</span>",
                                        $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: <span class=\"emergency_span\">%s</span>",
+                       exit(sprintf("[Main:] Emergency exit reached: <span class=\"emergency_span\">%s</span>",
                                $message
                        ));
                }