]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/class_BaseFrameworkSystem.php
Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / class_BaseFrameworkSystem.php
index 3db84d3f9e765ff6537efe89988b9fe8c323abba..0390d528d228f141e3462efa265ca7552185fc46 100644 (file)
@@ -34,8 +34,8 @@ use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
 use Org\Mxchange\CoreFramework\Middleware\Compressor\CompressorChannel;
 use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
 use Org\Mxchange\CoreFramework\Parser\Parseable;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Registry\Register;
-use Org\Mxchange\CoreFramework\Registry\Registry;
 use Org\Mxchange\CoreFramework\Resolver\Resolver;
 use Org\Mxchange\CoreFramework\Result\Database\CachedDatabaseResult;
 use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
@@ -184,16 +184,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         */
        private $helperInstance = NULL;
 
-       /**
-        * An instance of a Source class
-        */
-       private $sourceInstance = NULL;
-
-       /**
-        * An instance of a UrlSource class
-        */
-       private $urlSourceInstance = NULL;
-
        /**
         * An instance of a InputStream class
         */
@@ -244,11 +234,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         */
        private $directoryInstance = NULL;
 
-       /**
-        * An instance of a communicator
-        */
-       private $communicatorInstance = NULL;
-
        /**
         * The concrete output instance
         */
@@ -798,7 +783,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         * @return      $configInstance         Configuration instance
         */
        public final function getConfigInstance () {
-               $configInstance = Registry::getRegistry()->getInstance('config');
+               $configInstance = GenericRegistry::getRegistry()->getInstance('config');
                return $configInstance;
        }
 
@@ -819,7 +804,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         */
        public final function getDebugInstance () {
                // Get debug instance
-               $debugInstance = Registry::getRegistry()->getInstance('debug');
+               $debugInstance = GenericRegistry::getRegistry()->getInstance('debug');
 
                // Return it
                return $debugInstance;
@@ -841,7 +826,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         * @return      $webOutputInstance - Instance to class WebOutput
         */
        public final function getWebOutputInstance () {
-               $webOutputInstance = Registry::getRegistry()->getInstance('web_output');
+               $webOutputInstance = GenericRegistry::getRegistry()->getInstance('web_output');
                return $webOutputInstance;
        }
 
@@ -862,7 +847,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         */
        public final function getDatabaseInstance () {
                // Get instance
-               $databaseInstance = Registry::getRegistry()->getInstance('db_instance');
+               $databaseInstance = GenericRegistry::getRegistry()->getInstance('db_instance');
 
                // Return instance
                return $databaseInstance;
@@ -884,7 +869,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         * @return      $compressorInstance             The compressor channel
         */
        public final function getCompressorChannel () {
-               $compressorInstance = Registry::getRegistry()->getInstance('compressor');
+               $compressorInstance = GenericRegistry::getRegistry()->getInstance('compressor');
                return $compressorInstance;
        }
 
@@ -894,7 +879,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         * @return      $applicationInstance    An instance of a manageable application helper class
         */
        protected final function getApplicationInstance () {
-               $applicationInstance = Registry::getRegistry()->getInstance('app');
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
                return $applicationInstance;
        }
 
@@ -914,7 +899,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
         * @return      $langInstance   An instance to the language sub-system
         */
        protected final function getLanguageInstance () {
-               $langInstance = Registry::getRegistry()->getInstance('language');
+               $langInstance = GenericRegistry::getRegistry()->getInstance('language');
                return $langInstance;
        }
 
@@ -1218,44 +1203,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
                return $this->helperInstance;
        }
 
-       /**
-        * Setter for a Source instance
-        *
-        * @param       $sourceInstance         An instance of a Source class
-        * @return      void
-        */
-       protected final function setSourceInstance (Source $sourceInstance) {
-               $this->sourceInstance = $sourceInstance;
-       }
-
-       /**
-        * Getter for a Source instance
-        *
-        * @return      $sourceInstance         An instance of a Source class
-        */
-       protected final function getSourceInstance () {
-               return $this->sourceInstance;
-       }
-
-       /**
-        * Setter for a UrlSource instance
-        *
-        * @param       $sourceInstance         An instance of a UrlSource class
-        * @return      void
-        */
-       protected final function setUrlSourceInstance (UrlSource $urlSourceInstance) {
-               $this->urlSourceInstance = $urlSourceInstance;
-       }
-
-       /**
-        * Getter for a UrlSource instance
-        *
-        * @return      $urlSourceInstance              An instance of a UrlSource class
-        */
-       protected final function getUrlSourceInstance () {
-               return $this->urlSourceInstance;
-       }
-
        /**
         * Getter for a InputStream instance
         *
@@ -1482,25 +1429,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
                return $this->directoryInstance;
        }
 
-       /**
-        * Getter for communicator instance
-        *
-        * @return      $communicatorInstance   An instance of a Communicator class
-        */
-       public final function getCommunicatorInstance () {
-               return $this->communicatorInstance;
-       }
-
-       /**
-        * Setter for communicator instance
-        *
-        * @param       $communicatorInstance   An instance of a Communicator class
-        * @return      void
-        */
-       protected final function setCommunicatorInstance (Communicator $communicatorInstance) {
-               $this->communicatorInstance = $communicatorInstance;
-       }
-
        /**
         * Setter for state instance
         *
@@ -1704,7 +1632,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac
                // Is the application instance set?
                if (is_null($applicationInstance)) {
                        // Get the current instance
-                       $applicationInstance = Registry::getRegistry()->getInstance('app');
+                       $applicationInstance = GenericRegistry::getRegistry()->getInstance('app');
 
                        // Still null?
                        if (is_null($applicationInstance)) {
@@ -1867,7 +1795,7 @@ Loaded includes:
                        Registry::getRegistry()->addInstance('debug', $debugInstance);
                } else {
                        // Get instance from registry
-                       $debugInstance = Registry::getRegistry()->getInstance('debug');
+                       $debugInstance = GenericRegistry::getRegistry()->getDebugInstance();
                }
 
                // Return it
@@ -3195,7 +3123,7 @@ Loaded includes:
         */
        protected function initWebOutputInstance () {
                // Get application instance
-               $applicationInstance = Registry::getRegistry()->getInstance('app');
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('app');
 
                // Init web output instance
                $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($applicationInstance));