]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/class_BaseFrameworkSystem.php
Method constructor() removed, several small fixes
[shipsimu.git] / inc / classes / main / class_BaseFrameworkSystem.php
index f053ac3ff8f1d7b3a9c4cb14a69d49397dc44ba1..796860a240861b315167783a24ceb3f395d7653f 100644 (file)
@@ -167,9 +167,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         *
         * @return      void
         */
-       private function __construct ($class) {
+       protected function __construct ($class) {
                // Set real class
                $this->setRealClass($class);
+
+               // Init this instance
+               $this->initInstance($class);
        }
 
        /**
@@ -220,14 +223,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        }
 
        /**
-        * Public constructor (for initializing things, etc.)
+        * Initializes the instance
         *
         * @return      void
         */
-       public function constructor ($class) {
-               // Call constructor
-               $this->__construct($class);
-
+       public function initInstance ($class) {
                // Get the current (singleton) configuration instance
                $this->setConfigInstance(FrameworkConfiguration::createFrameworkConfiguration());
 
@@ -287,12 +287,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        /**
         * Setter for language instance
         *
-        * @param               $configInstance The configuration instance which shall
+        * @param       $configInstance The configuration instance which shall
         *                                                      be FrameworkConfiguration
         * @return      void
         */
        public final function setConfigInstance (FrameworkConfiguration $configInstance) {
-               $this->cfgInstance = $configInstance;
+               self::$cfgInstance = $configInstance;
                if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Konfigurations-Handler auf <strong>%s</strong> gesetzt.<br />\n",
                        $this->__toString(),
                        $configInstance->__toString()
@@ -307,9 +307,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        public final function getConfigInstance () {
                if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Konfigurations-Handler <strong>%s</strong> angefordert.<br />\n",
                        $this->__toString(),
-                       $this->cfgInstance->__toString()
+                       self::$cfgInstance->__toString()
                ));
-               return $this->cfgInstance;
+               return self::$cfgInstance;
        }
 
        /**