class Flintstone

Constants

VERSION

Flintstone version.

Properties

protected Database $database Database class.
protected Config $config Config class.

Methods

__construct(Database|string $database, Config|array $config)

Constructor.

getDatabase()

Get the database.

setDatabase(Database $database)

Set the database.

getConfig()

Get the config.

setConfig(Config $config)

Set the config.

mixed
get(string $key)

Get a key from the database.

set(string $key, mixed $data)

Set a key in the database.

delete(string $key)

Delete a key from the database.

flush()

Flush the database.

array
getKeys()

Get all keys from the database.

array
getAll()

Get all data from the database.

replace(string $key, mixed $data)

Replace a key in the database.

string
getLineString(string $key, mixed $data)

Get the line string to write.

mixed
decodeData(string $data)

Decode a string into data.

string
encodeData(mixed $data)

Encode data into a string.

Details

at line 34
__construct(Database|string $database, Config|array $config)

Constructor.

Parameters

Database|string $database
Config|array $config

at line 53
Database getDatabase()

Get the database.

Return Value

Database

at line 63
setDatabase(Database $database)

Set the database.

Parameters

Database $database

at line 73
Config getConfig()

Get the config.

Return Value

Config

at line 83
setConfig(Config $config)

Set the config.

Parameters

Config $config

at line 96
mixed get(string $key)

Get a key from the database.

Parameters

string $key

Return Value

mixed

at line 133
set(string $key, mixed $data)

Set a key in the database.

Parameters

string $key
mixed $data

at line 157
delete(string $key)

Delete a key from the database.

Parameters

string $key

at line 169
flush()

Flush the database.

at line 184
array getKeys()

Get all keys from the database.

Return Value

array

at line 202
array getAll()

Get all data from the database.

Return Value

array

at line 221
protected replace(string $key, mixed $data)

Replace a key in the database.

Parameters

string $key
mixed $data

at line 257
protected string getLineString(string $key, mixed $data)

Get the line string to write.

Parameters

string $key
mixed $data

Return Value

string

at line 269
protected mixed decodeData(string $data)

Decode a string into data.

Parameters

string $data

Return Value

mixed

at line 281
protected string encodeData(mixed $data)

Encode data into a string.

Parameters

mixed $data

Return Value

string