Com\Tecnick\Pdf\File\Cache
Tags
Table of Contents
- $path : string
- Cache path
- $prefix : string
- File prefix
- __construct() : mixed
- Set the file prefix (common name)
- delete() : mixed
- Delete cached files
- getCachePath() : string
- Get the cache directory path
- getFilePrefix() : string
- Get the file prefix
- getNewFileName() : string
- Returns a temporary filename for caching files
- setCachePath() : mixed
- Set the default cache directory path
- defineSystemCachePath() : mixed
- Set the K_PATH_CACHE constant (if not set) to the default system directory for temporary files
- normalizePath() : string
- Normalize cache path
Properties
$path
Cache path
protected static string $path
$prefix
File prefix
protected static string $prefix
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
Return values
mixed —delete()
Delete cached files
public delete([string $type
= null
][,
string $key
= null
]) : mixed
Parameters
- $type : string = null
-
Type of files to delete
- $key : string = null
-
Specific file key to delete
Return values
mixed —getCachePath()
Get the cache directory path
public getCachePath()
: string
Return values
string —getFilePrefix()
Get the file prefix
public getFilePrefix()
: string
Return values
string —getNewFileName()
Returns a temporary filename for caching files
public getNewFileName([string $type
= 'tmp'
][,
string $key
= '0'
]) : string
Parameters
- $type : string = 'tmp'
-
Type of file
- $key : string = '0'
-
File key (used to retrieve file from cache)
Return values
string —filename
setCachePath()
Set the default cache directory path
public setCachePath([string|null $path
= null
]) : mixed
Parameters
- $path : string|null = null
-
Cache directory path; if null use the K_PATH_CACHE value
Return values
mixed —defineSystemCachePath()
Set the K_PATH_CACHE constant (if not set) to the default system directory for temporary files
protected defineSystemCachePath()
: mixed
Return values
mixed —normalizePath()
Normalize cache path
protected normalizePath(string $path)
: string
Parameters
- $path : string
-
Path to normalize