PHP Class Pinq\Caching\CacheProvider

Author: Elliot Levin ([email protected])
Datei anzeigen Open project: timetoogo/pinq Class Usage Examples

Public Methods

Method Description
getCache ( ) : Pinq\Caching\IQueryCache Returns a query cache with the configured adapter.
getCacheAdapter ( ) : Pinq\Caching\ICacheAdapter Returns the configured cache implementation
removeCache ( ) : void Removes the configured cache implementation.
setArrayAccessCache ( ArrayAccess $cache ) : void Uses the supplied array access cache to store the parsed queries.
setCustomCache ( Pinq\Caching\ICacheAdapter $cache ) : void Uses the supplied cache to store the parsed queries.
setDevelopmentMode ( boolean $isDevelopmentMode ) : void If set to true, the cache will be cleared when needed.
setDirectoryCache ( string $directory, string $fileExtension = DirectoryCache::DEFAULT_EXTENSION ) : void Uses the supplied directory to store the parsed queries.
setDoctrineCache ( CacheProvider $cache ) : void Uses the supplied doctrine cache to store the parsed queries.
setFileCache ( string $fileName ) : void Uses the supplied file to store the parsed queries.

Private Methods

Method Description
__construct ( )
getImplementation ( ) : Pinq\Caching\ICacheAdapter

Method Details

getCache() public static method

Returns a query cache with the configured adapter.
public static getCache ( ) : Pinq\Caching\IQueryCache
return Pinq\Caching\IQueryCache

getCacheAdapter() public static method

Returns the configured cache implementation
public static getCacheAdapter ( ) : Pinq\Caching\ICacheAdapter
return Pinq\Caching\ICacheAdapter

removeCache() public static method

Removes the configured cache implementation.
public static removeCache ( ) : void
return void

setArrayAccessCache() public static method

Uses the supplied array access cache to store the parsed queries.
public static setArrayAccessCache ( ArrayAccess $cache ) : void
$cache ArrayAccess The array access cache
return void

setCustomCache() public static method

Uses the supplied cache to store the parsed queries.
public static setCustomCache ( Pinq\Caching\ICacheAdapter $cache ) : void
$cache Pinq\Caching\ICacheAdapter The cache implementations
return void

setDevelopmentMode() public static method

If set to true, the cache will be cleared when needed.
public static setDevelopmentMode ( boolean $isDevelopmentMode ) : void
$isDevelopmentMode boolean
return void

setDirectoryCache() public static method

Uses the supplied directory to store the parsed queries.
public static setDirectoryCache ( string $directory, string $fileExtension = DirectoryCache::DEFAULT_EXTENSION ) : void
$directory string The directory to cache the data
$fileExtension string The file extension for every cache file
return void

setDoctrineCache() public static method

Uses the supplied doctrine cache to store the parsed queries.
public static setDoctrineCache ( CacheProvider $cache ) : void
$cache Doctrine\Common\Cache\CacheProvider The doctrine cache
return void

setFileCache() public static method

Uses the supplied file to store the parsed queries.
public static setFileCache ( string $fileName ) : void
$fileName string The file to cache the data
return void