Skip to content
A better way to work with files. Metadata available too.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/markdown
src
tests
.gitattributes
.gitignore
.travis.yml
LICENSE
README.md
autoload.php
composer.json
docs-generator.php
phpunit.xml

README.md

Object Storage

File-based object storage with simple API, metadata support, atomic operations and transactions.

Build Status Latest Stable Version codecov.io License Codacy Badge

Install via Composer

composer require ivopetkov/object-storage

Documentation

Full documentation is available as part of this repository.

Example

$storage = new \IvoPetkov\ObjectStorage('path/to/the/data/dir/');

// Save data
$storage->set([
    'key' => 'books/1449392776',
    'body' => 'book 1449392776 content in pdf format',
    'metadata.title' => 'Programming PHP',
    'metadata.authors' => '["Kevin Tatroe", "Peter MacIntyre", "Rasmus Lerdorf"]',
    'metadata.year' => '2013'
]);

// Retrieve data
$result = $storage->get([
    'key' => 'books/1449392776',
    'result' => ['body', 'metadata.title']
]);
// Array
// (
//     [body] => 'book 1449392776 content in pdf format'
//     [metadata.title] => 'Programming PHP'
// )

License

This project is licensed under the MIT License. See the license file for more information.

Contributing

Feel free to open new issues and contribute to the project. Let's make it awesome and let's do in a positive way.

Author

This library is created and maintained by Ivo Petkov (ivopetkov.com).

You can’t perform that action at this time.