8000 GitHub - adammbalogh/key-value-store-null: Key Value Null Store
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

adammbalogh/key-value-store-null

Repository files navigation

Key Value Null Store

Author Build Status Coverage Status Quality Score Software License Packagist Version Total Downloads

SensioLabsInsight

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.

Toolset

Key Value Server
✔ delete ✔ get ✔ flush
✔ expire ✔ set
✔ getTtl
✔ has
✔ persist

Support

Support with Gittip

About

Key Value Null Store

Resources

License

< 4FB3 div class="mt-2"> MIT license

Stars

Watchers

Forks

Packages

No packages published

Languages

0