dev-master
9999999-dev https://github.com/avinashjoshi/cakephp-mapstoreMapStore - A Key Value store for CakePHP
MIT
The Requires
- php >=5.4.16
- cakephp/cakephp ~3.0
The Development Requires
MapStore - A Key Value store for CakePHP
MapStore is a key-value store plugin for CakePHP framework. It is inspired by other key-value store projects., (*2)
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 allows to specify if the value shoud be encrypted or not., (*6)
true
).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)
<?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();
// Load the databases without database encryption $store_2 = MapStore::load('store_2', ['encrypt' => false]);
Feel free to open an issue if you need help or have ideas to improve this plugin., (*9)
Contributions and Pull Requests are always more than welcome!, (*10)
MapStore - A Key Value store for CakePHP
MIT