]> git.mxchange.org Git - shipsimu.git/commitdiff
Renamed getInstance() to getSelfInstance(), conflicts BaseRegistry versus several...
authorRoland Häder <roland@mxchange.org>
Tue, 8 Nov 2011 06:44:03 +0000 (06:44 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 8 Nov 2011 06:44:03 +0000 (06:44 +0000)
13 files changed:
application/selector/config.php
application/selector/data.php
application/selector/exceptions.php
application/selector/init.php
application/selector/loader.php
application/selector/starter.php
application/ship-simu/config.php
application/ship-simu/data.php
application/ship-simu/exceptions.php
application/ship-simu/init.php
application/ship-simu/loader.php
application/ship-simu/starter.php
index.php

index 587eccc91327414f8155cf1628795a41c05bc136..bade6cbef15368bfb0bf9237f52f1e77eb862bf5 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 // Get a configuration instance for shorter lines
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // CFG: HEADER-CHARSET
 $cfg->setConfigEntry('header_charset', 'utf-8');
index 99b3159c417214d3006c160795b5b5682cdfe7e4..aca64d9577d92d558bf1bfb49e68adb55bcefebb 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 // Get config instance
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // Get an instance of the helper
 $app = call_user_func_array(
index ef9e8452af8e6b6a537ecfb159e650a994275b16..1184f43a503023a7e1da2e0897aa2580de3404cf 100644 (file)
@@ -26,8 +26,8 @@
 function __exceptionHandler (FrameworkException $e) {
        // Call the app_die() method
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> (<span class=\"app_short_name\">%s</span>) has terminated due to an uncaught exception: <span class=\"exception_name\">%s</span> <span class=\"exception_number\">[%s]</span>: <span class=\"debug_exception\">%s</span> Backtrace: <div class=\"debug_backtrace\">%s</div>",
-               ApplicationHelper::getInstance()->getAppName(),
-               ApplicationHelper::getInstance()->getAppShortName(),
+               ApplicationHelper::getSelfInstance()->getAppName(),
+               ApplicationHelper::getSelfInstance()->getAppShortName(),
                $e->__toString(),
                $e->getHexCode(),
                $e->getMessage(),
index 00ce0061df774fc88d1518ee92284648750db18c..a77ca0d763da10d8b28100dca7310e618e01cfa7 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 // Get config instance
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // Initialize output system
 require($cfg->getConfigEntry('base_path') . 'inc/output.php');
index a6b49bbfe180f51b9669d82d0937080b0418e956..abe45346c617c9cd9299cc054cbf6c9544904616 100644 (file)
  */
 
 // Get config instance
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // Load all classes
-ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name')));
+ClassLoader::getSelfInstance()->scanClassPath(sprintf("%s/%s/", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name')));
 
 // Clean up the global namespace
 unset($lowerClasses);
index 9336b4a4224eb2f7e968c82e39ae1f3ec9dce327..c0923bf0cb33558c0aaefe06267dedd3b7b42e16 100644 (file)
 
 // Is there an application helper instance? We need the method main() for
 // maining the application
-$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array());
+$app = call_user_func_array(array(FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array());
 
 // Some sanity checks
 if ((empty($app)) || (is_null($app))) {
        // Something went wrong!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
                $application,
-               FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class')
+               FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class')
        ));
 } elseif (!is_object($app)) {
        // No object!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because &#39;app&#39; is not an object.",
                $application
        ));
-} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method'))) {
+} elseif (!method_exists($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method'))) {
        // Method not found!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
                $application,
-               FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')
+               FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')
        ));
 }
 
 // Call the entry point method
-call_user_func_array(array($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')), array());
+call_user_func_array(array($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')), array());
 
 // [EOF]
 ?>
index bdf71c882e5ef958b3ebcade98aaed0ccb848689..e9a8f794d9da0155b421ba55ac6b7abe02e21afa 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 // Get a configuration instance for shorter lines
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // CFG: HEADER-CHARSET
 $cfg->setConfigEntry('header_charset', 'utf-8');
index c4249c4dce8a32d493a1e790528717c3f75e9cae..86f6ab67546e0710270efcf674339e6e3fd48c21 100644 (file)
@@ -34,7 +34,7 @@
  */
 
 // Get config instance
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // Get an instance of the helper
 $app = call_user_func_array(
index ef9e8452af8e6b6a537ecfb159e650a994275b16..1184f43a503023a7e1da2e0897aa2580de3404cf 100644 (file)
@@ -26,8 +26,8 @@
 function __exceptionHandler (FrameworkException $e) {
        // Call the app_die() method
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> (<span class=\"app_short_name\">%s</span>) has terminated due to an uncaught exception: <span class=\"exception_name\">%s</span> <span class=\"exception_number\">[%s]</span>: <span class=\"debug_exception\">%s</span> Backtrace: <div class=\"debug_backtrace\">%s</div>",
-               ApplicationHelper::getInstance()->getAppName(),
-               ApplicationHelper::getInstance()->getAppShortName(),
+               ApplicationHelper::getSelfInstance()->getAppName(),
+               ApplicationHelper::getSelfInstance()->getAppShortName(),
                $e->__toString(),
                $e->getHexCode(),
                $e->getMessage(),
index 32108c94f8c55b202d890a70b5ca6c4f2a8fb6cb..906cdf94ad3853bef6cf922ef2d711c124edb994 100644 (file)
@@ -34,7 +34,7 @@
  */
 
 // Get config instance
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // Initialize output system
 require($cfg->getConfigEntry('base_path') . 'inc/output.php');
index 46790372d73b380be89a123e1d470c2b4b99fb56..c0786aaadbc13529efd3fa750cbc09d3d1b1b160 100644 (file)
  */
 
 // Get config instance
-$cfg = FrameworkConfiguration::getInstance();
+$cfg = FrameworkConfiguration::getSelfInstance();
 
 // Load all classes for the application
 foreach ($lowerClasses as $className) {
        // Load the application classes
-       ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $className));
+       ClassLoader::getSelfInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $className));
 } // END - if
 
 // Clean up the global namespace
index 3a188492a247996e7a59ca9c327a228d3466a088..30280b533cf3be03e812b7f551c5ae18e4e9e8c2 100644 (file)
 
 // Is there an application helper instance? We need the method main() for
 // maining the application
-$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array());
+$app = call_user_func_array(array(FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array());
 
 // Some sanity checks
 if ((empty($app)) || (is_null($app))) {
        // Something went wrong!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
                $application,
-               FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class')
+               FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class')
        ));
 } elseif (!is_object($app)) {
        // No object!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because &#39;app&#39; is not an object.",
                $application
        ));
-} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method'))) {
+} elseif (!method_exists($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method'))) {
        // Method not found!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
                $application,
-               FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')
+               FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')
        ));
 }
 
 // Call user function
-call_user_func_array(array($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')), array());
+call_user_func_array(array($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')), array());
 
 // [EOF]
 ?>
index 3950334e917c67e0b9c65eaa558bae402cfd9677..66a45e537db557b1c3bb771a5bb1828b1207d247 100644 (file)
--- a/index.php
+++ b/index.php
@@ -34,8 +34,6 @@ final class ApplicationEntryPoint {
 
        /**
         * The instances we want to remove after all is done
-        *
-        * @return      void
         */
        private static $instances = array (
                'cfg',    // The configuration system
@@ -75,7 +73,7 @@ final class ApplicationEntryPoint {
                } // END - if
 
                // Get config instance
-               $configInstance = FrameworkConfiguration::getInstance();
+               $configInstance = FrameworkConfiguration::getSelfInstance();
 
                // Do we have debug installation?
                if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) {
@@ -84,14 +82,14 @@ final class ApplicationEntryPoint {
                } // END - if
 
                // Get some instances
-               $tpl = FrameworkConfiguration::getInstance()->getConfigEntry('web_template_class');
-               $languageInstance = LanguageSystem::getInstance();
+               $tpl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('web_template_class');
+               $languageInstance = LanguageSystem::getSelfInstance();
 
                // Initialize template instance here to avoid warnings in IDE
-               $templateInstance = null;
+               $templateInstance = NULL;
 
                // Get response instance
-               $responseInstance = ApplicationHelper::getInstance()->getResponseInstance();
+               $responseInstance = ApplicationHelper::getSelfInstance()->getResponseInstance();
 
                // Is the template engine loaded?
                if ((class_exists($tpl)) && (is_object($languageInstance))) {
@@ -130,12 +128,12 @@ final class ApplicationEntryPoint {
                        } // END - foreach
 
                        // Init application instance
-                       $applicationInstance = null;
+                       $applicationInstance = NULL;
 
                        // Is the class there?
                        if (class_exists('ApplicationHelper')) {
                                // Get application instance
-                               $applicationInstance = ApplicationHelper::getInstance();
+                               $applicationInstance = ApplicationHelper::getSelfInstance();
 
                                // Assign application data
                                $templateInstance->assignApplicationData($applicationInstance);
@@ -148,7 +146,7 @@ final class ApplicationEntryPoint {
                                $templateInstance->assignVariable('code', $code);
                                $templateInstance->assignVariable('extra', $extraData);
                                $templateInstance->assignVariable('backtrace', $backtrace);
-                               $templateInstance->assignVariable('total_includes', ClassLoader::getInstance()->getTotal());
+                               $templateInstance->assignVariable('total_includes', ClassLoader::getSelfInstance()->getTotal());
                                $templateInstance->assignVariable('total_objects', ObjectFactory::getTotal());
                                $templateInstance->assignVariable('title', $languageInstance->getMessage('emergency_exit_title'));