adammbalogh/key-value-store-file

通过 fire015/flintstone 包实现的关键值文件存储。

0.5.3 2014-10-20 17:36 UTC

This package is auto-updated.

Last update: 2024-08-29 02:09:50 UTC


README

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

SensioLabsInsight

描述

此库提供了一层键值文件存储。

它使用了 fire015/flintstone 包。

查看 抽象库 中的链接以查看其他适配器和API。

安装

通过 composer 安装。

{
    "require": {
        "adammbalogh/key-value-store-file": "@stable"
    }
}

提示:您应浏览 adammbalogh/key-value-store-file 页面,选择要使用的稳定版本,避免使用 @stable 元数据约束。

用法

<?php
use AdammBalogh\KeyValueStore\KeyValueStore;
use AdammBalogh\KeyValueStore\Adapter\FileAdapter as Adapter;
use Flintstone\Flintstone;

$fileClient = Flintstone::load('usersDatabase', ['dir' => '/tmp']);

$adapter = new Adapter($fileClient);

$kvs = new KeyValueStore($adapter);

$kvs->set('sample_key', 'Sample value');
$kvs->get('sample_key');
$kvs->delete('sample_key');

API

请访问抽象库中的 API 链接。

工具集

支持

Support with Gittip