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

Public Member Functions

 __construct (Cache $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

Doctrine 2 cache adapter

http://www.doctrine-project.org/

Definition at line 12 of file DoctrineCacheAdapter.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Cache\DoctrineCacheAdapter::__construct ( Cache  $cache)
Parameters
Cache$cacheDoctrine cache object

Definition at line 17 of file DoctrineCacheAdapter.php.

References Guzzle\Cache\AbstractCacheAdapter\$cache.

Member Function Documentation

◆ contains()

Guzzle\Cache\DoctrineCacheAdapter::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 DoctrineCacheAdapter.php.

◆ delete()

Guzzle\Cache\DoctrineCacheAdapter::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 DoctrineCacheAdapter.php.

◆ fetch()

Guzzle\Cache\DoctrineCacheAdapter::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 DoctrineCacheAdapter.php.

◆ save()

Guzzle\Cache\DoctrineCacheAdapter::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 DoctrineCacheAdapter.php.


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