]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/database/class_BaseDatabaseWrapper.php
Rewrite continued:
[core.git] / framework / main / classes / database / class_BaseDatabaseWrapper.php
index edc28b9d4ff10676bb01c73faa4cc763463da03e..dbf0872ea591140b0dd0ba0acf175b4b16784aec 100644 (file)
@@ -62,7 +62,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
         */
        private final function initCacheInstance () {
                // Is the cache enabled?
         */
        private final function initCacheInstance () {
                // Is the cache enabled?
-               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
+               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) {
                        // Set the new instance
                        $this->cacheInstance = CacheFactory::getFactory()->createConfiguredCache();
                } // END - if
                        // Set the new instance
                        $this->cacheInstance = CacheFactory::getFactory()->createConfiguredCache();
                } // END - if
@@ -99,14 +99,14 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                $cacheKey = NULL;
 
                // Is cache enabled?
                $cacheKey = NULL;
 
                // Is cache enabled?
-               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
+               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) {
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
                        //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
                } // END - if
 
                // Does this key exists in cache?
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
                        //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
                } // END - if
 
                // Does this key exists in cache?
-               if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) && ($this->cacheInstance->offsetExists($cacheKey))) {
+               if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey))) {
                        // Purge the cache
                        $this->cacheInstance->purgeOffset($cacheKey);
                } // END - if
                        // Purge the cache
                        $this->cacheInstance->purgeOffset($cacheKey);
                } // END - if
@@ -127,14 +127,14 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                $cacheKey = NULL;
 
                // Is cache enabled?
                $cacheKey = NULL;
 
                // Is cache enabled?
-               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
+               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) {
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
                        //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
                } // END - if
 
                // Does this key exists in cache?
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
                        //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
                } // END - if
 
                // Does this key exists in cache?
-               if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) && ($this->cacheInstance->offsetExists($cacheKey))) {
+               if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey))) {
                        // Purge the cache
                        $this->cacheInstance->purgeOffset($cacheKey);
                } // END - if
                        // Purge the cache
                        $this->cacheInstance->purgeOffset($cacheKey);
                } // END - if
@@ -174,15 +174,15 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                $cacheKey = NULL;
 
                // Is the cache enabled?
                $cacheKey = NULL;
 
                // Is the cache enabled?
-               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
+               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) {
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($criteriaInstance, $onlyKeys);
                } // END - if
 
                // Does this key exists in cache?
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($criteriaInstance, $onlyKeys);
                } // END - if
 
                // Does this key exists in cache?
-               if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) && ($this->cacheInstance->offsetExists($cacheKey, BaseDatabaseBackend::RESULT_INDEX_ROWS, 1))) {
+               if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey, BaseDatabaseBackend::RESULT_INDEX_ROWS, 1))) {
                        // Debug message
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Cache used for cacheKey=' . $cacheKey . ':' . print_r($this->cacheInstance->offsetGet($cacheKey), TRUE));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Cache used for cacheKey=' . $cacheKey . ':' . print_r($this->cacheInstance->offsetGet($cacheKey), true));
 
                        // Then use this result
                        $result = $this->cacheInstance->offsetGet($cacheKey);
 
                        // Then use this result
                        $result = $this->cacheInstance->offsetGet($cacheKey);
@@ -197,7 +197,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                        // Cache the result if not null
                        if (!is_null($result)) {
                                // Is cache enabled?
                        // Cache the result if not null
                        if (!is_null($result)) {
                                // Is cache enabled?
-                               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
+                               if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) {
                                        // A valid result has returned from the database layer
                                        $this->cacheInstance->offsetSet($cacheKey, $result);
                                } // END - if
                                        // A valid result has returned from the database layer
                                        $this->cacheInstance->offsetSet($cacheKey, $result);
                                } // END - if