From 08ac3d01e18f81d282f2a9f1f17bfa214d8c3050 Mon Sep 17 00:00:00 2001 From: boite Date: Tue, 30 Oct 2018 10:10:26 +0000 Subject: [PATCH] Add Service.getKeyPrefix() --- src/Service.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Service.php b/src/Service.php index 82d5ff3..41f4fdd 100644 --- a/src/Service.php +++ b/src/Service.php @@ -7,18 +7,23 @@ class Service { private $storageadapter; - private $prefix; + private $prefix = ''; public function __construct($storageadapter) { $this->storageadapter = $storageadapter; } - + public function setKeyPrefix($prefix) { $this->prefix = $prefix; } + public function getKeyPrefix() + { + return $this->prefix; + } + public function get($key) { return $this->storageadapter->getData($this->prefix . $key);