jdodds/key-value-file

a simple file-backed persistent key-value store

v1.0.0 2013-01-07 00:22 UTC

This package is not auto-updated.

Last update: 2025-07-05 19:40:09 UTC


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;