Skip to content

Commit e363dd8

Browse files
authored
Merge pull request #3 from boite/master
Add Service.getKeyPrefix() to complement the existing setKeyPrefix method
2 parents af4fa83 + 08ac3d0 commit e363dd8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Service.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,23 @@
77
class Service
88
{
99
private $storageadapter;
10-
private $prefix;
10+
private $prefix = '';
1111

1212
public function __construct($storageadapter)
1313
{
1414
$this->storageadapter = $storageadapter;
1515
}
16-
16+
1717
public function setKeyPrefix($prefix)
1818
{
1919
$this->prefix = $prefix;
2020
}
2121

22+
public function getKeyPrefix()
23+
{
24+
return $this->prefix;
25+
}
26+
2227
public function get($key)
2328
{
2429
return $this->storageadapter->getData($this->prefix . $key);

0 commit comments

Comments
 (0)