]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/factories/cache/class_CacheFactory.php
Some cleanups, more usage of ObjectFactory:
[core.git] / inc / classes / main / factories / cache / class_CacheFactory.php
index 5e169fb94675e23827556ba1b8d33beabe3e3239..029b6cd658836f9a31f54367b0e16ef3e72e8b1a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -25,7 +25,7 @@ class CacheFactory extends BaseFactory {
        /**
         * Singleton instance
         */
-       private static $selfInstance = null;
+       private static $selfInstance = NULL;
 
        /**
         * Protected constructor
@@ -42,12 +42,12 @@ class CacheFactory extends BaseFactory {
         *
         * @return      $selfInstance   An instance of this class
         */
-       public final static function getFactory () {
+       public static final function getFactory () {
                // Is the instance null?
                if (is_null(self::$selfInstance)) {
                        // Set a new one
                        self::$selfInstance = new CacheFactory();
-               }
+               } // END - if
 
                // Return the instance
                return self::$selfInstance;
@@ -60,7 +60,7 @@ class CacheFactory extends BaseFactory {
         */
        public function createConfiguredCache () {
                // Read the config entry
-               $cacheType = $this->getConfigInstance()->readConfig('cache_class');
+               $cacheType = $this->getConfigInstance()->getConfigEntry('cache_class');
 
                // And get a new instance
                $cacheInstance = ObjectFactory::createObjectByName($cacheType);