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
Via Composer
$ composer require shinjin/freezer
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.
See CHANGELOG.
$ composer test
Bugfixes are welcome. Please submit pull requests to Github.
The MIT License (MIT). Please see License File for more information.
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.