2017 © Pedro Peláez
 

library keyvaluestore

KeyValueStore Component

image

msonnabaum/keyvaluestore

KeyValueStore Component

  • Monday, August 6, 2012
  • by RobLoach
  • Repository
  • 1 Watchers
  • 8 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Key/Value Store Component

KeyValueStore is an abstraction layer for diverse key/value storage engines., (*1)

Examples

A simple usage example:, (*2)

use KeyValueStore\KeyValueStoreFactory;

// Define which collections are handled by which storage implementations.
$info = array(
  'cache.boot' => 'KeyValueStore\Storage\MemcachedStorage',
  'cache' => 'KeyValueStore\Storage\RedisStorage',
  'default' => 'KeyValueStore\Storage\SqlStorage',
);
$factory = new KeyValueStoreFactory($info);

// This selects 'cache', since 'cache.common' is not specified.
$storage = $factory->get('cache.common');

// Store something.
$storage->set('foo', 'bar');
// Get it back.
$storage->get('foo');

// Store multiple key/value pairs.
$storage->setMultiple(array(
  'bar' => 'baz',
));

// Get everything.
$storage->getAll();

Tests

To run the unit tests, install dev dependencies before running PHPUnit:, (*3)

php composer.phar install --dev

Run the unit tests with:, (*4)

phpunit

The Versions

06/08 2012

dev-master

9999999-dev https://github.com/msonnabaum/KeyValueStore

KeyValueStore Component

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

nosql keyvalue