A simple key-value storage class. used for configurations and extended in vakata/session.
Via Composer
$ composer require vakata/kvstore
$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 ] ]
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.