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.
- Host: GitHub
- URL: https://github.com/jdodds/php-key-value-file
- Owner: jdodds
- License: other
- Created: 2013-01-07T00:23:12.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-07T00:26:09.000Z (over 13 years ago)
- Last Synced: 2025-06-07T01:04:07.765Z (about 1 year ago)
- Language: PHP
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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;