2017 © Pedro Peláez
 

cakephp-plugin cakephp-mapstore

MapStore - A Key Value store for CakePHP

image

avinashjoshi/cakephp-mapstore

MapStore - A Key Value store for CakePHP

  • Wednesday, December 9, 2015
  • by avinashjoshi
  • Repository
  • 1 Watchers
  • 1 Stars
  • 81 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MapStore

Software License Build Status Coverage Status, (*1)

MapStore is a key-value store plugin for CakePHP framework. It is inspired by other key-value store projects., (*2)

Installation

The easiest & recommended way to install MapStore is via composer. Run the following command:, (*3)

composer require avinashjoshi/cakephp-mapstore

After that you should load the plugin in your app editing config/bootstrap.php:, (*4)

Plugin::load('MapStore');

After loading the plugin you need to migrate the tables for the plugin using:, (*5)

bin/cake migrations migrate -p MapStore

Configuration

Configuration allows to specify if the value shoud be encrypted or not., (*6)

  • encrypt (required/optional): Set to false if you would like to disable encryption (Default is true).
  • key (required/optional): you can specify a key to be used by Security class to encrypt/decrypt value.
  • salt (required/optional): you can specify a salt to be used by Security class to encrypt/decrypt value.

key and salt can also be set globally by adding them to CakePHP's application configuration at app.php:, (*7)

<?php
return [
    'Security' => [
        'salt' => 'some long & random salt',
        'key' => 'some long & random key'
    ]
];

You can grab a good pair of key and salt at Random Key Generator., (*8)

Basic Usage

<?php
use MapStore\Store\MapStore;

$store = MapStore::load('store_1');

$store->set('name', 'Avinash Joshi');
$store->get('name'); // Returns 'Avinash Joshi'
$store->delete('name');
$store->flush();

More Examples

// Load the databases without database encryption
$store_2 = MapStore::load('store_2', ['encrypt' => false]);

Support

Feel free to open an issue if you need help or have ideas to improve this plugin., (*9)

Contributing

Contributions and Pull Requests are always more than welcome!, (*10)

The Versions

09/12 2015

dev-master

9999999-dev https://github.com/avinashjoshi/cakephp-mapstore

MapStore - A Key Value store for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires