shinjin / freezer
A cool object storage library
0.6
2018-04-06 02:40 UTC
Requires
- php: ^5.6 || ^7.0
- doctrine/cache: ^1.0
- shinjin/pdo: dev-master
Requires (Dev)
- php-coveralls/php-coveralls: ^2.0
- phpunit/phpunit: ^5.0
This package is not auto-updated.
Last update: 2025-05-11 09:01:26 UTC
README
A cool object storage library.
Use freezer if you need:
- an easy way to store and fetch objects and object graphs
- a schemaless datastore with drivers for PDO, DoctrineCache, and CouchDB
Install
Via Composer
$ composer require shinjin/freezer
Usage
use Freezer\Storage\Pdo; $storage = new Pdo(array('driver' => 'sqlite')); $caveman = new class { public $name = 'Brendan'; public $nationality = 'Canadian'; }; $id = $storage->store($caveman); // wait 2 million years $caveman = $storage->fetch($id); print_r($caveman); // class@anonymous Object // ( // [name] => Brendan // [nationality] => Canadian // )
See Usage and Old README for the original writeup.
Change log
See CHANGELOG.
Testing
$ composer test
Contributing
Bugfixes are welcome. Please submit pull requests to Github.
Authors
License
The MIT License (MIT). Please see License File for more information.
Acknowledgements
Freezer is based on php-object-freezer by Sebastian Bergmann. Most of freezer's core and test code is his. Sebastian Bergmann is not affiliated with this project in any way, shape, or form.