Open Journal Systems  3.3.0
Zf2CacheAdapter.php
1 <?php
2 
3 namespace Guzzle\Cache;
4 
5 use Zend\Cache\Storage\StorageInterface;
6 
13 {
17  public function __construct(StorageInterface $cache)
18  {
19  $this->cache = $cache;
20  }
21 
22  public function contains($id, array $options = null)
23  {
24  return $this->cache->hasItem($id);
25  }
26 
27  public function delete($id, array $options = null)
28  {
29  return $this->cache->removeItem($id);
30  }
31 
32  public function fetch($id, array $options = null)
33  {
34  return $this->cache->getItem($id);
35  }
36 
37  public function save($id, $data, $lifeTime = false, array $options = null)
38  {
39  return $this->cache->setItem($id, $data);
40  }
41 }
Guzzle\Cache\Zf2CacheAdapter
Definition: Zf2CacheAdapter.php:12
Guzzle\Cache\Zf2CacheAdapter\fetch
fetch($id, array $options=null)
Definition: Zf2CacheAdapter.php:32
Guzzle\Cache\Zf2CacheAdapter\__construct
__construct(StorageInterface $cache)
Definition: Zf2CacheAdapter.php:17
Guzzle\Cache\Zf2CacheAdapter\contains
contains($id, array $options=null)
Definition: Zf2CacheAdapter.php:22
Guzzle\Cache\Zf2CacheAdapter\save
save($id, $data, $lifeTime=false, array $options=null)
Definition: Zf2CacheAdapter.php:37
Guzzle\Cache
Definition: AbstractCacheAdapter.php:3
Guzzle\Cache\AbstractCacheAdapter
Definition: AbstractCacheAdapter.php:8
Guzzle\Cache\AbstractCacheAdapter\$cache
$cache
Definition: AbstractCacheAdapter.php:10