Open Monograph Press  3.3.0
Guzzle\Cache\Zf2CacheAdapter Class Reference
Inheritance diagram for Guzzle\Cache\Zf2CacheAdapter:
Guzzle\Cache\AbstractCacheAdapter Guzzle\Cache\CacheAdapterInterface

Public Member Functions

 __construct (StorageInterface $cache)
 
 contains ($id, array $options=null)
 
 delete ($id, array $options=null)
 
 fetch ($id, array $options=null)
 
 save ($id, $data, $lifeTime=false, array $options=null)
 
- Public Member Functions inherited from Guzzle\Cache\AbstractCacheAdapter
 getCacheObject ()
 

Additional Inherited Members

- Protected Attributes inherited from Guzzle\Cache\AbstractCacheAdapter
 $cache
 

Detailed Description

Zend Framework 2 cache adapter

http://packages.zendframework.com/docs/latest/manual/en/zend.cache.html

Definition at line 12 of file Zf2CacheAdapter.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Cache\Zf2CacheAdapter::__construct ( StorageInterface  $cache)
Parameters
StorageInterface$cacheZend Framework 2 cache adapter

Definition at line 17 of file Zf2CacheAdapter.php.

References Guzzle\Cache\AbstractCacheAdapter\$cache.

Member Function Documentation

◆ contains()

Guzzle\Cache\Zf2CacheAdapter::contains (   $id,
array  $options = null 
)

Test if an entry exists in the cache.

Parameters
string$idcache id The cache id of the entry to check for.
array$optionsArray of cache adapter options
Returns
bool Returns TRUE if a cache entry exists for the given cache id, FALSE otherwise.

Implements Guzzle\Cache\CacheAdapterInterface.

Definition at line 22 of file Zf2CacheAdapter.php.

◆ delete()

Guzzle\Cache\Zf2CacheAdapter::delete (   $id,
array  $options = null 
)

Deletes a cache entry.

Parameters
string$idcache id
array$optionsArray of cache adapter options
Returns
bool TRUE on success, FALSE on failure

Implements Guzzle\Cache\CacheAdapterInterface.

Definition at line 27 of file Zf2CacheAdapter.php.

◆ fetch()

Guzzle\Cache\Zf2CacheAdapter::fetch (   $id,
array  $options = null 
)

Fetches an entry from the cache.

Parameters
string$idcache id The id of the cache entry to fetch.
array$optionsArray of cache adapter options
Returns
string The cached data or FALSE, if no cache entry exists for the given id.

Implements Guzzle\Cache\CacheAdapterInterface.

Definition at line 32 of file Zf2CacheAdapter.php.

◆ save()

Guzzle\Cache\Zf2CacheAdapter::save (   $id,
  $data,
  $lifeTime = false,
array  $options = null 
)

Puts data into the cache.

Parameters
string$idThe cache id
string$dataThe cache entry/data
int | bool$lifeTimeThe lifetime. If != false, sets a specific lifetime for this cache entry
array$optionsArray of cache adapter options
Returns
bool TRUE if the entry was successfully stored in the cache, FALSE otherwise.

Implements Guzzle\Cache\CacheAdapterInterface.

Definition at line 37 of file Zf2CacheAdapter.php.


The documentation for this class was generated from the following file: