thavarshan / storable
File Storabled key, value storage system.
Installs: 2 720
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0
Requires (Dev)
- mockery/mockery: ^1.3.1
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.2
This package is auto-updated.
Last update: 2021-06-05 21:42:14 UTC
README
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