Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • AbstractCacheAdapter
  • CacheAdapterFactory
  • ClosureCacheAdapter
  • DoctrineCacheAdapter
  • NullCacheAdapter
  • Zf1CacheAdapter
  • Zf2CacheAdapter

Interfaces

  • CacheAdapterInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo
 1: <?php
 2: 
 3: namespace Guzzle\Cache;
 4: 
 5: use Zend\Cache\Storage\StorageInterface;
 6: 
 7: /**
 8:  * Zend Framework 2 cache adapter
 9:  *
10:  * @link http://packages.zendframework.com/docs/latest/manual/en/zend.cache.html
11:  */
12: class Zf2CacheAdapter extends AbstractCacheAdapter
13: {
14:     /**
15:      * @param StorageInterface $cache Zend Framework 2 cache adapter
16:      */
17:     public function __construct(StorageInterface $cache)
18:     {
19:         $this->cache = $cache;
20:     }
21: 
22:     /**
23:      * {@inheritdoc}
24:      */
25:     public function contains($id, array $options = null)
26:     {
27:         return $this->cache->hasItem($id);
28:     }
29: 
30:     /**
31:      * {@inheritdoc}
32:      */
33:     public function delete($id, array $options = null)
34:     {
35:         return $this->cache->removeItem($id);
36:     }
37: 
38:     /**
39:      * {@inheritdoc}
40:      */
41:     public function fetch($id, array $options = null)
42:     {
43:         return $this->cache->getItem($id);
44:     }
45: 
46:     /**
47:      * {@inheritdoc}
48:      */
49:     public function save($id, $data, $lifeTime = false, array $options = null)
50:     {
51:         return $this->cache->setItem($id, $data);
52:     }
53: }
54: 
php-coveralls API documentation generated by ApiGen 2.8.0