adammbalogh / key-value-store-null
Key-value null store package. It literally does nothing.
Installs: 23 810
Dependents: 0
Suggesters: 1
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
- adammbalogh/key-value-store: ~0.5.1
Requires (Dev)
- phpmd/phpmd: ~2.1
- phpunit/phpunit: ~4.2.5
- satooshi/php-coveralls: dev-master
- squizlabs/php_codesniffer: ~1.5
This package is auto-updated.
Last update: 2024-11-29 02:53:23 UTC
README
Description
This library provides a layer to a key value null store.
It does not use a third party package. It literally does nothing.
Check out the abstract library to see the other adapters and the Api.
Installation
Install it through composer.
{ "require": { "adammbalogh/key-value-store-null": "@stable" } }
tip: you should browse the adammbalogh/key-value-store-null
page to choose a stable version to use, avoid the @stable
meta constraint.
Usage
<?php use AdammBalogh\KeyValueStore\KeyValueStore; use AdammBalogh\KeyValueStore\Exception\KeyNotFoundException; use AdammBalogh\KeyValueStore\Adapter\NullAdapter as Adapter; $adapter = new Adapter(); $kvs = new KeyValueStore($adapter); $kvs->set('sample_key', 'Sample value'); try { $kvs->get('sample_key'); } catch (KeyNotFoundException $e) { // null adapter's get method throws KeyNotFoundException } $kvs->delete('sample_key');
API
Please visit the API link in the abstract library.