\Phile\Plugin\Phile\SimpleFileDataPersistence\PersistenceSimpleFileDataPersistence

Class SimpleFileDataPersistence

Summary

Methods
Properties
Constants
__construct()
has()
get()
set()
delete()
No public properties found
No constants found
getInternalKey()
getStorageFile()
$dataDirectory
N/A
No private methods found
No private properties found
N/A

Properties

$dataDirectory

$dataDirectory :string

Type

string—the data storage directory

Methods

__construct()

__construct(string  $dataDir)

the constructor

Parameters

string $dataDir

Directory to store data

has()

has(string  $key): boolean

check if key exists

Parameters

string $key

Returns

boolean

get()

get(string  $key): mixed

get value for given key

Parameters

string $key

Throws

\Phile\Exception\AbstractException

Returns

mixed

set()

set(string  $key,mixed  $value): void

set value for given key

Parameters

string $key
mixed $value

delete()

delete(string  $key,array  $options = array()): void

delte given key/index

Parameters

string $key
array $options

Throws

\Phile\Exception\AbstractException

getInternalKey()

getInternalKey(string  $key): string

generate internal key

Parameters

string $key

Returns

string

getStorageFile()

getStorageFile(string  $key): string

get storage filename

Parameters

string $key

Returns

string