From 2d24ba659fbd603be253fcd5ecdbfae4ed5fca1b Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 12 May 2018 05:46:43 +0900 Subject: [PATCH] =?UTF-8?q?KVStorage=EC=97=90=20unset=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sammo/KVStorage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sammo/KVStorage.php b/src/sammo/KVStorage.php index e68fddea..8b6ae0b0 100644 --- a/src/sammo/KVStorage.php +++ b/src/sammo/KVStorage.php @@ -22,6 +22,10 @@ class KVStorage{ return $this->setValue($key, $value); } + public function __unset($key){ + $this->deleteValue($key); + } + public function resetCache(bool $disableCache=true):self{ if($disableCache){ $this->cacheData = null; @@ -185,7 +189,7 @@ class KVStorage{ $result[$key] = null; } } - return $value; + return $result; } private function getDBValue($key){