1: <?php
2:
3: namespace Guzzle\Cache;
4:
5: use Doctrine\Common\Cache\Cache;
6:
7: /**
8: * Doctrine 2 cache adapter
9: *
10: * @link http://www.doctrine-project.org/
11: */
12: class DoctrineCacheAdapter extends AbstractCacheAdapter
13: {
14: /**
15: * DoctrineCacheAdapter
16: *
17: * @param Cache $cache Doctrine cache object
18: */
19: public function __construct(Cache $cache)
20: {
21: $this->cache = $cache;
22: }
23:
24: /**
25: * {@inheritdoc}
26: */
27: public function contains($id, array $options = null)
28: {
29: return $this->cache->contains($id);
30: }
31:
32: /**
33: * {@inheritdoc}
34: */
35: public function delete($id, array $options = null)
36: {
37: return $this->cache->delete($id);
38: }
39:
40: /**
41: * {@inheritdoc}
42: */
43: public function fetch($id, array $options = null)
44: {
45: return $this->cache->fetch($id);
46: }
47:
48: /**
49: * {@inheritdoc}
50: */
51: public function save($id, $data, $lifeTime = false, array $options = null)
52: {
53: return $this->cache->save($id, $data, $lifeTime);
54: }
55: }
56: