vakata / kvstore
A simple key-value storage class
Installs: 4 389
Dependents: 3
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.0.0
README
A simple key-value storage class. used for configurations and extended in vakata/session.
Install
Via Composer
$ composer require vakata/kvstore
Usage
$config = new \vakata\kvstore\Storage([ 'sample' => [ 'data' => 1] ]); $config->get('sample.data', null, '.'); // 1 $config->set('sample.data', 2, '.'); // 2 $config->get('sample.data', null, '.'); // 2 $config->del('sample.data', '.'); // 2 $config->get('sample.data', null, '.'); // null $config->get('sample.data', 'default', '.'); // "default" $config->set('new.data.to.add', 2, '.'); // 2 $config->get('new.data', null, '.'); // [ 'to' => [ 'add' => 2 ] ]
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.