Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1137 from fauvel/issue-981
Browse files Browse the repository at this point in the history
CM_Model_Location::create* not db-slave-compliant (cont'd)
  • Loading branch information
fauvel committed May 9, 2014
2 parents 5522e6d + d606f75 commit 0d8b665
Show file tree
Hide file tree
Showing 18 changed files with 757 additions and 226 deletions.
4 changes: 3 additions & 1 deletion library/CM/Class/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ protected static function _getConfig() {
$cache = new CM_Cache_Storage_Apc();
if (!self::$_classConfigCacheEnabled || false === ($result = $cache->get($cacheKey))) {
$result = self::_getConfigRaw();
$cache->set($cacheKey, $result);
if (self::$_classConfigCacheEnabled) {
$cache->set($cacheKey, $result);
}
}
return $result;
}
Expand Down
20 changes: 17 additions & 3 deletions library/CM/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ public function __construct($enabled) {
$this->_enabled = (bool) $enabled;
}

/**
* @return array[]
*/

public function getStats() {
return $this->_stats;
}

/**
* @param string $key
* @param string|string[] $value
Expand All @@ -33,11 +41,17 @@ public function incStats($key, $value) {
}

/**
* @return array[]
* @return bool
*/
public function isEnabled() {
return $this->_enabled;
}

public function getStats() {
return $this->_stats;
/**
* @param bool $state
*/
public function setEnabled($state) {
$this->_enabled = $state;
}

/**
Expand Down
Loading

0 comments on commit 0d8b665

Please sign in to comment.