CacheFile
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- addContent() : mixed
- checkFileExists() : bool
- Check the file exists
- compareDates() : bool
- Compare the DB last modify date and the file creation date.
- getJsonContent() : string
- Get the saved file json content
- getSize() : int
- checkFileModificationTime() : type
- Get the File modification date
Properties
$filename
private
mixed
$filename
$path
private
mixed
$path
Methods
__construct()
public
__construct(string $path, string $filename) : mixed
Parameters
- $path : string
- $filename : string
addContent()
public
addContent(string $content) : mixed
Parameters
- $content : string
checkFileExists()
Check the file exists
public
checkFileExists() : bool
Return values
boolcompareDates()
Compare the DB last modify date and the file creation date.
public
compareDates(string $date) : bool
If the DB last modify is newer then we need to create a new file.
Parameters
- $date : string
Return values
boolgetJsonContent()
Get the saved file json content
public
getJsonContent() : string
Return values
stringgetSize()
public
getSize() : int
Return values
intcheckFileModificationTime()
Get the File modification date
private
checkFileModificationTime() : type