Cache
in package
Com\Tecnick\Pdf\File\Cache
Tags
Table of Contents
Methods
- __construct() : mixed
- Set the file prefix (common name)
- delete() : void
- Delete cached files
- getCachePath() : string
- Get the cache directory path
- getFilePrefix() : string
- Get the file prefix
- getNewFileName() : string|false
- Returns a temporary filename for caching files
- setCachePath() : void
- Set the default cache directory path
Methods
__construct()
Set the file prefix (common name)
public __construct([string $prefix
= null
]) : mixed
Parameters
- $prefix : string = null
-
Common prefix to be used for all cache files
delete()
Delete cached files
public delete([string|null $type
= null
][,
string|null $key
= null
]) : void
Parameters
- $type : string|null = null
-
Type of files to delete
- $key : string|null = null
-
Specific file key to delete
getCachePath()
Get the cache directory path
public getCachePath()
: string
Return values
stringgetFilePrefix()
Get the file prefix
public getFilePrefix()
: string
Return values
stringgetNewFileName()
Returns a temporary filename for caching files
public getNewFileName([string $type
= 'tmp'
][,
string $key
= '0'
]) : string|false
Parameters
- $type : string = 'tmp'
-
Type of file
- $key : string = '0'
-
File key (used to retrieve file from cache)
Return values
string|false —filename
setCachePath()
Set the default cache directory path
public setCachePath([string|null $path
= null
]) : void
Parameters
- $path : string|null = null
-
Cache directory path; if null use the K_PATH_CACHE value