PHP Класс M1\Vars\Cache\CacheProvider

С версии: 0.1.0
Наследование: use trait M1\Vars\Traits\PathTrait
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string | array $resource, array $options ) Creates a new instance of the cacheProvider for Vars
checkCache ( ) : boolean Checks the cache to see if there is a valid cache available
getAttempted ( ) : boolean Returns if the cache has been attempted
getExpire ( ) : integer Returns how long the cache lasts for
getLoadedVars ( ) : Vars Returns the loaded Vars object
getProvide ( ) : boolean Returns if cache is on or off
getTime ( ) : integer Returns when the cache was made
isHit ( ) : integer Returns how long the cache lasts for
load ( ) Load the cached file into $this->loaded_vars
makeCache ( Vars $vars ) Transfer the contents of the parent Vars object into a file for cache
setProvide ( boolean $provide ) : CacheProvider Set the cache on or off
setTime ( integer $time ) : CacheProvider Sets the time when the Vars was cached

Описание методов

__construct() публичный Метод

Creates a new instance of the cacheProvider for Vars
public __construct ( string | array $resource, array $options )
$resource string | array The main configuration resource
$options array The options being used for Vars

checkCache() публичный Метод

Checks the cache to see if there is a valid cache available
public checkCache ( ) : boolean
Результат boolean Returns true if has the cached resource

getAttempted() публичный Метод

Returns if the cache has been attempted
public getAttempted ( ) : boolean
Результат boolean Has the cache been attempted

getExpire() публичный Метод

Returns how long the cache lasts for
public getExpire ( ) : integer
Результат integer Cache expire time

getLoadedVars() публичный Метод

Returns the loaded Vars object
public getLoadedVars ( ) : Vars
Результат M1\Vars\Vars The loaded Vars object

getProvide() публичный Метод

Returns if cache is on or off
public getProvide ( ) : boolean
Результат boolean Is cache on or off

getTime() публичный Метод

Returns when the cache was made
public getTime ( ) : integer
Результат integer Cache creation time

isHit() публичный Метод

Returns how long the cache lasts for
public isHit ( ) : integer
Результат integer Cache expire time

load() публичный Метод

Load the cached file into $this->loaded_vars
public load ( )

makeCache() публичный Метод

Transfer the contents of the parent Vars object into a file for cache
public makeCache ( Vars $vars )
$vars M1\Vars\Vars Parent vars object

setProvide() публичный Метод

Set the cache on or off
public setProvide ( boolean $provide ) : CacheProvider
$provide boolean Does the cache want to be on or off
Результат CacheProvider

setTime() публичный Метод

Sets the time when the Vars was cached
public setTime ( integer $time ) : CacheProvider
$time integer Time when vars cached was created
Результат CacheProvider The cacheProvider object