PHP 클래스 M1\Vars\Cache\CacheProvider

부터: 0.1.0
상속: use trait M1\Vars\Traits\PathTrait
파일 보기 프로젝트 열기: m1/Vars 1 사용 예제들

공개 메소드들

메소드 설명
__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