Skip to content
This repository has been archived by the owner on May 23, 2021. It is now read-only.
/ storable Public archive

🧺 File based key, value storage system.

License

Notifications You must be signed in to change notification settings

Thavarshan/storable

Repository files navigation

Storable PHP

Storable PHP makes it easy to store and retrieve some loose values with the same exact syntax as Laravel's config repository. Stored values are saved as a JSON file.

Getting Started

Installing

Storable is easy to install into your project. simply install Storable by using composer to pull it in and it's dependencies.

composer require thavarshan/storable

Basic Usage

use \Storable\Store;

$store = new Store($pathToFile);
$store->set('foo', 'bar');
$store->get('foo'); // should return 'bar'.

All values will be saved as JSON in the given file. When there are no values stored, the file will be deleted. You can call the following methods on the Store.

Running the tests

Storable uses PHPUnit for testing. To clone Storable into your local machine and run tests, simple open up your preferred terminal application, navigate into Storable project root directory and run the following command..

git clone git@github.com:Thavarshan/storable.git
cd storable
composer install
composer test

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Thavarshan Thayananthajothy - Initial work - Thavarshan

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details