Cache classes converted to new shortcut translation usage.

This commit is contained in:
predominant 2010-04-16 01:45:34 +10:00
parent 1e425907b2
commit 41fe51d4b9
3 changed files with 7 additions and 7 deletions

View file

@ -534,7 +534,7 @@ class CacheEngine {
* @return boolean True if the data was succesfully cached, false on failure * @return boolean True if the data was succesfully cached, false on failure
*/ */
public function write($key, &$value, $duration) { public function write($key, &$value, $duration) {
trigger_error(sprintf(__('Method write() not implemented in %s', true), get_class($this)), E_USER_ERROR); trigger_error(sprintf(__('Method write() not implemented in %s'), get_class($this)), E_USER_ERROR);
} }
/** /**
@ -544,7 +544,7 @@ class CacheEngine {
* @return mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it * @return mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it
*/ */
public function read($key) { public function read($key) {
trigger_error(sprintf(__('Method read() not implemented in %s', true), get_class($this)), E_USER_ERROR); trigger_error(sprintf(__('Method read() not implemented in %s'), get_class($this)), E_USER_ERROR);
} }
/** /**
@ -555,7 +555,7 @@ class CacheEngine {
* @return New incremented value, false otherwise * @return New incremented value, false otherwise
*/ */
public function increment($key, $offset = 1) { public function increment($key, $offset = 1) {
trigger_error(sprintf(__('Method increment() not implemented in %s', true), get_class($this)), E_USER_ERROR); trigger_error(sprintf(__('Method increment() not implemented in %s'), get_class($this)), E_USER_ERROR);
} }
/** /**
* Decrement a number under the key and return decremented value * Decrement a number under the key and return decremented value
@ -565,7 +565,7 @@ class CacheEngine {
* @return New incremented value, false otherwise * @return New incremented value, false otherwise
*/ */
public function decrement($key, $offset = 1) { public function decrement($key, $offset = 1) {
trigger_error(sprintf(__('Method decrement() not implemented in %s', true), get_class($this)), E_USER_ERROR); trigger_error(sprintf(__('Method decrement() not implemented in %s'), get_class($this)), E_USER_ERROR);
} }
/** /**
* Delete a key from the cache * Delete a key from the cache

View file

@ -254,7 +254,7 @@ class FileEngine extends CacheEngine {
function __active() { function __active() {
if ($this->_init && !is_writable($this->settings['path'])) { if ($this->_init && !is_writable($this->settings['path'])) {
$this->_init = false; $this->_init = false;
trigger_error(sprintf(__('%s is not writable', true), $this->settings['path']), E_USER_WARNING); trigger_error(sprintf(__('%s is not writable'), $this->settings['path']), E_USER_WARNING);
} }
return true; return true;
} }

View file

@ -132,7 +132,7 @@ class MemcacheEngine extends CacheEngine {
*/ */
public function increment($key, $offset = 1) { public function increment($key, $offset = 1) {
if ($this->settings['compress']) { if ($this->settings['compress']) {
trigger_error(sprintf(__('Method increment() not implemented for compressed cache in %s', true), get_class($this)), E_USER_ERROR); trigger_error(sprintf(__('Method increment() not implemented for compressed cache in %s'), get_class($this)), E_USER_ERROR);
} }
return $this->__Memcache->increment($key, $offset); return $this->__Memcache->increment($key, $offset);
} }
@ -147,7 +147,7 @@ class MemcacheEngine extends CacheEngine {
*/ */
public function decrement($key, $offset = 1) { public function decrement($key, $offset = 1) {
if ($this->settings['compress']) { if ($this->settings['compress']) {
trigger_error(sprintf(__('Method decrement() not implemented for compressed cache in %s', true), get_class($this)), E_USER_ERROR); trigger_error(sprintf(__('Method decrement() not implemented for compressed cache in %s'), get_class($this)), E_USER_ERROR);
} }
return $this->__Memcache->decrement($key, $offset); return $this->__Memcache->decrement($key, $offset);
} }