ArrayStorageDriver
in package
implements
StorageDriverInterface
Example implementation of a storage driver
Table of Contents
Interfaces
Properties
- $storage : array<string|int, mixed>
Methods
Properties
$storage
private
array<string|int, mixed>
$storage
= []
Methods
get()
Retrieve stored data
public
get(string $key) : mixed
Parameters
- $key : string
-
Data key
Tags
Return values
mixed —Stored data
save()
Store data
public
save(string $key, mixed $data) : bool
Parameters
- $key : string
-
Data key
- $data : mixed
-
Data to be stored
Tags
Return values
bool —True if storage was successful