mordisacks / localstorage
like html5 local storage but for php.
1.0.3
2022-01-10 13:47 UTC
Requires
- php: >=5.6.0
This package is auto-updated.
Last update: 2024-11-10 20:11:15 UTC
README
like html5 local storage but for php.
Installation
composer require mordisacks/localstorage
Usage
Statically
LocalStorage::set('foo', 'bar'); echo LocalStorage::get('foo'); // outputs bar
Or via instance
$localStorage = new LocalStorage(); $localStorage->foo = 'bar'; echo $localStorage->foo; // outputs bar
Use custom driver
LocalStorage::init(LocalStorageDriverInterface $driver);
And via instance
$localStorage = new LocalStorage(LocalStorageDriverInterface $driver);