Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getItem($key)
 {
     $item = new TextCacheItem($key);
     if (!$this->hasItem($key)) {
         return $item;
     }
     $data = explode(';', file_get_contents("{$this->cacheFolder}/{$key}.txt"));
     return $item->set($data[0])->expiresAt(new \DateTime($data[1]));
 }
Exemplo n.º 2
0
 public function testGet()
 {
     $this->item->set('test');
     $this->assertEquals('test', $this->item->get());
 }