\erdiko\core\cacheFile

File

Summary

Methods
Properties
Constants
__construct()
write()
read()
delete()
move()
rename()
copy()
fileExists()
__destruct()
getKeyCode()
put()
get()
forget()
forgetAll()
has()
No public properties found
No constants found
No protected methods found
$_defaultPath
N/A
No private methods found
No private properties found
N/A

Properties

$_defaultPath

$_defaultPath : 

Default Path

Type

Methods

__construct()

__construct( $cacheDir)

Constructor

Parameters

$cacheDir

write()

write(string $content, string $filename, string $pathToFile, string $mode) : integer

Write string to file

Parameters

string $content
string $filename
string $pathToFile
string $mode
  • Default mode: w

Returns

integer —
  • bytes written to file

read()

read(string $filename, string $pathToFile) : string

Read string to file

Parameters

string $filename
string $pathToFile

Returns

string

delete()

delete(string $filename, string $pathToFile) : boolean

Delete a file

Parameters

string $filename
string $pathToFile

Returns

boolean

move()

move(string $filename, string $pathTo,  $pathFrom) : boolean

Move a file

Parameters

string $filename
string $pathTo
$pathFrom

Returns

boolean

rename()

rename(string $oldName,  $newName,  $pathToFile) : boolean

Rename a file

Parameters

string $oldName
$newName
$pathToFile

Returns

boolean

copy()

copy(string $filename, string $newFilePath, string $newFileName, string $pathToFile) : boolean

Copy a file

Parameters

string $filename
string $newFilePath
string $newFileName
string $pathToFile

Returns

boolean

fileExists()

fileExists(string $filename, string $pathToFile) : boolean

Check if a file exists

Parameters

string $filename
string $pathToFile

Returns

boolean

__destruct()

__destruct()

Destructor

getKeyCode()

getKeyCode(string $key) : string

Get Key Code

Parameters

string $key

Returns

string

put()

put(mixed $key, mixed $data)

Put Key

Parameters

mixed $key
mixed $data

get()

get( $key) : mixed

Get Key

Parameters

$key

Returns

mixed

forget()

forget( $key)

Forget a key

Parameters

$key

forgetAll()

forgetAll()

Forget all key

has()

has(mixed $key) : boolean

Check if a key exists

Parameters

mixed $key

Returns

boolean