From bf2ca381da2f63439f23df91369a68dccae6ea4b Mon Sep 17 00:00:00 2001 From: Tyler Brownell Date: Thu, 23 Apr 2015 15:44:37 -0400 Subject: Renames $_adapter to $_driver. It's what we call it everywhere else. --- system/libraries/Cache/Cache.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'system') diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 5d32240ce..39d05d930 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -74,7 +74,7 @@ class CI_Cache extends CI_Driver_Library { * * @var mixed */ - protected $_adapter = 'dummy'; + protected $_driver = 'dummy'; /** * Fallback driver @@ -114,19 +114,19 @@ class CI_Cache extends CI_Driver_Library { isset($config['key_prefix']) && $this->key_prefix = $config['key_prefix']; // If the specified adapter isn't available, check the backup. - if ( ! $this->is_supported($this->_adapter)) + if ( ! $this->is_supported($this->_driver)) { if ( ! $this->is_supported($this->_backup)) { // Backup isn't supported either. Default to 'Dummy' driver. - log_message('error', 'Cache adapter "'.$this->_adapter.'" and backup "'.$this->_backup.'" are both unavailable. Cache is now using "Dummy" adapter.'); - $this->_adapter = 'dummy'; + log_message('error', 'Cache adapter "'.$this->_driver.'" and backup "'.$this->_backup.'" are both unavailable. Cache is now using "Dummy" adapter.'); + $this->_driver = 'dummy'; } else { // Backup is supported. Set it to primary. - log_message('debug', 'Cache adapter "'.$this->_adapter.'" is unavailable. Falling back to "'.$this->_backup.'" backup adapter.'); - $this->_adapter = $this->_backup; + log_message('debug', 'Cache adapter "'.$this->_driver.'" is unavailable. Falling back to "'.$this->_backup.'" backup adapter.'); + $this->_driver = $this->_backup; } } } @@ -144,7 +144,7 @@ class CI_Cache extends CI_Driver_Library { */ public function get($id) { - return $this->{$this->_adapter}->get($this->key_prefix.$id); + return $this->{$this->_driver}->get($this->key_prefix.$id); } // ------------------------------------------------------------------------ @@ -160,7 +160,7 @@ class CI_Cache extends CI_Driver_Library { */ public function save($id, $data, $ttl = 60, $raw = FALSE) { - return $this->{$this->_adapter}->save($this->key_prefix.$id, $data, $ttl, $raw); + return $this->{$this->_driver}->save($this->key_prefix.$id, $data, $ttl, $raw); } // ------------------------------------------------------------------------ @@ -173,7 +173,7 @@ class CI_Cache extends CI_Driver_Library { */ public function delete($id) { - return $this->{$this->_adapter}->delete($this->key_prefix.$id); + return $this->{$this->_driver}->delete($this->key_prefix.$id); } // ------------------------------------------------------------------------ @@ -187,7 +187,7 @@ class CI_Cache extends CI_Driver_Library { */ public function increment($id, $offset = 1) { - return $this->{$this->_adapter}->increment($id, $offset); + return $this->{$this->_driver}->increment($id, $offset); } // ------------------------------------------------------------------------ @@ -201,7 +201,7 @@ class CI_Cache extends CI_Driver_Library { */ public function decrement($id, $offset = 1) { - return $this->{$this->_adapter}->decrement($id, $offset); + return $this->{$this->_driver}->decrement($id, $offset); } // ------------------------------------------------------------------------ @@ -213,7 +213,7 @@ class CI_Cache extends CI_Driver_Library { */ public function clean() { - return $this->{$this->_adapter}->clean(); + return $this->{$this->_driver}->clean(); } // ------------------------------------------------------------------------ @@ -226,7 +226,7 @@ class CI_Cache extends CI_Driver_Library { */ public function cache_info($type = 'user') { - return $this->{$this->_adapter}->cache_info($type); + return $this->{$this->_driver}->cache_info($type); } // ------------------------------------------------------------------------ @@ -239,7 +239,7 @@ class CI_Cache extends CI_Driver_Library { */ public function get_metadata($id) { - return $this->{$this->_adapter}->get_metadata($this->key_prefix.$id); + return $this->{$this->_driver}->get_metadata($this->key_prefix.$id); } // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b