rkr/sqlite-key-value-store

A sqlite-based key-value-store implementation.

dev-master 2016-07-12 12:34 UTC

This package is auto-updated.

Last update: 2024-10-29 04:14:37 UTC


README

Travis

A sqlite-based key-value-store implementation.

Installation

composer require "rkr/sqlite-key-value-store" "dev-master"

Usage

<?php
namespace Example;
use Kir\Stores\KeyValueStores\Sqlite\PdoSqliteContextRepository;

require 'vendor/autoload.php';

$sqliteFilename = ':memory:';
$repository = new PdoSqliteContextRepository($sqliteFilename);
$store = $repository->get('persons');
$store->set('alfred', json_encode(['age' => 37]));
$value = json_decode($store->get('alfred', '[]'), true);
print_r($value);