deemru/pairs

Simple key-value SQLite storage

1.0.4 2020-01-17 20:18 UTC

This package is auto-updated.

Last update: 2021-07-17 23:47:36 UTC


README

packagist php-v travis codacy license

Pairs implements a simple key-value SQLite storage.

  • Easy to use
  • Built-in cache

Usage

$pairs = new Pairs( __DIR__ . '/storage.sqlite', 'pairs', true );

$key = 1;
$value = 'Hello, World!';
$pairs->setKeyValue( $key, $value );

if( $pairs->getKey( $value ) !== $key ||
    $pairs->getValue( $key ) !== $value )
    exit( 1 );

Requirements

Installation

Require through Composer:

{
    "require": {
        "deemru/pairs": "1.0.*"
    }
}