PHP Class Pinq\Caching\CacheProvider

Author: Elliot Levin ([email protected])
Afficher le fichier Open project: timetoogo/pinq Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
__construct ( )
getImplementation ( ) : Pinq\Caching\ICacheAdapter

Method Details

getCache() public static méthode

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

getCacheAdapter() public static méthode

Returns the configured cache implementation
public static getCacheAdapter ( ) : Pinq\Caching\ICacheAdapter
Résultat Pinq\Caching\ICacheAdapter

removeCache() public static méthode

Removes the configured cache implementation.
public static removeCache ( ) : void
Résultat void

setArrayAccessCache() public static méthode

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

setCustomCache() public static méthode

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

setDevelopmentMode() public static méthode

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

setDirectoryCache() public static méthode

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
Résultat void

setDoctrineCache() public static méthode

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

setFileCache() public static méthode

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