Represents a key-value data store.
Initialises a new store connection.
The filename that the store is located in.
has(string $key): boolean
Determines if the given key exists in the store or not.
The key to test.
Whether the key exists in the store or not.
get_keys(string $exclude): \PDOStatement
Returns an iterable that returns all the keys that do not contain the given string.
The string to search for when excluding keys.
The iterable. Use a foreach loop on it.
get(string $key): mixed
Gets a value from the store.
The key value is stored under.
The stored value.
get_arr_simple(\string $key,\string $delimiter = "|")
set(string $key,mixed $value)
Sets a value in the data store.
Note that this does NOT save changes to disk until you close the connection!
The key to set the value of.
The value to store.
set_arr_simple(\string $key, $value,\string $delimiter = "|")
delete(string $key): boolean
Deletes an item from the data store.
The key of the item to delete.
Whether it was really deleted or not. Note that if it doesn't exist, then it can't be deleted.
Empties the store.
Syncs changes to disk and closes the PDO connection.