PHP Class Bolt\Storage\Database\Schema\Timer

Author: Gawain Lynch ([email protected])
Afficher le fichier Open project: bolt/bolt

Protected Properties

Свойство Type Description
$cacheFile Bolt\Filesystem\Handler\FileInterface
$expired boolean

Méthodes publiques

Méthode Description
__construct ( Bolt\Filesystem\Handler\FileInterface $cacheFile ) Constructor.
isCheckRequired ( ) : boolean Check if we have determined that we need to do a database check.
setCheckExpiry ( ) Set our state as valid by writing the current date/time to the app/cache/dbcheck.ts file.
setCheckRequired ( ) Invalidate our database check by removing the timestamp file from cache.

Method Details

__construct() public méthode

Constructor.
public __construct ( Bolt\Filesystem\Handler\FileInterface $cacheFile )
$cacheFile Bolt\Filesystem\Handler\FileInterface

isCheckRequired() public méthode

Check if we have determined that we need to do a database check.
public isCheckRequired ( ) : boolean
Résultat boolean

setCheckExpiry() public méthode

We only want to do these checks once per hour, per session, since it's pretty time consuming… Unless specifically requested.
public setCheckExpiry ( )

setCheckRequired() public méthode

Invalidate our database check by removing the timestamp file from cache.
public setCheckRequired ( )

Property Details

$cacheFile protected_oe property

protected FileInterface,Bolt\Filesystem\Handler $cacheFile
Résultat Bolt\Filesystem\Handler\FileInterface

$expired protected_oe property

protected bool $expired
Résultat boolean