Example #1
0
 public function store(Item $item)
 {
     $this->delete($item->getKey());
     return file_put_contents($this->generateNewFilename($item), serialize($item)) !== false;
 }
Example #2
0
 public function testGetKey()
 {
     $item = new Item('key');
     $this->assertEquals('key', $item->getKey());
 }
Example #3
0
 public function store(Item $item)
 {
     $this->data[$item->getKey()] = $item;
     return true;
 }