An open API service indexing awesome lists of open source software.

https://github.com/jdodds/php-key-value-file

A very simple file-backed key-value store for PHP.
https://github.com/jdodds/php-key-value-file

Last synced: 5 months ago
JSON representation

A very simple file-backed key-value store for PHP.

Awesome Lists containing this project

README

          

This is a very simple file-backed persistent key-value store for php.

Usage:

$store = new JDodds\Storage\KeyValueFile('/path/to/save/in');

$store->attach('foo', 'bar');
$store['baz'] = 'quux';

$store->persist();

// ... sometime later

$store = new JDodds\Storage\KeyValueFile('/the/same/path/as/before');
$foo = $store['foo'];

$foo2 = $store->detach('foo');
$store->contains('foo') // false;