From 5fb143deba294375a1fb7da129ffaa65eef7d258 Mon Sep 17 00:00:00 2001 From: Gordon Stratton Date: Sat, 8 Dec 2012 03:15:31 +0000 Subject: [PATCH] fix misspelled getCacheStorge() - Add a new method: getCacheStorage() - Mark old method as deprecated and have it call the new method --- src/SaveHandler/Cache.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/SaveHandler/Cache.php b/src/SaveHandler/Cache.php index f7714a73..b0c7548d 100644 --- a/src/SaveHandler/Cache.php +++ b/src/SaveHandler/Cache.php @@ -86,7 +86,7 @@ public function close() */ public function read($id) { - return $this->getCacheStorge()->getItem($id); + return $this->getCacheStorage()->getItem($id); } /** @@ -98,7 +98,7 @@ public function read($id) */ public function write($id, $data) { - return $this->getCacheStorge()->setItem($id, $data); + return $this->getCacheStorage()->setItem($id, $data); } /** @@ -109,7 +109,7 @@ public function write($id, $data) */ public function destroy($id) { - return $this->getCacheStorge()->removeItem($id); + return $this->getCacheStorage()->removeItem($id); } /** @@ -120,7 +120,7 @@ public function destroy($id) */ public function gc($maxlifetime) { - $cache = $this->getCacheStorge(); + $cache = $this->getCacheStorage(); if ($cache instanceof ClearExpiredCacheStorage) { return $cache->clearExpired(); } @@ -140,12 +140,20 @@ public function setCacheStorage(CacheStorage $cacheStorage) } /** - * Get Cache Storage Adapter Object + * Get cache storage * * @return CacheStorage */ - public function getCacheStorge() + public function getCacheStorage() { return $this->cacheStorage; } + + /** + * @deprecated Misspelled method - use getCacheStorage() instead + */ + public function getCacheStorge() + { + return $this->getCacheStorage(); + } }