An open API service indexing awesome lists of open source software.

https://github.com/kherge-archive/php-object-storage

An object store for specific objects.
https://github.com/kherge-archive/php-object-storage

Last synced: about 2 months ago
JSON representation

An object store for specific objects.

Awesome Lists containing this project

README

          

Object Storage
==============

[![Build Status]](http://travis-ci.org/herrera-io/php-object-storage)

A simple object storage class that will only allow "supported" objects.

```php
class MyObjectStorage extends Herrera\Util\ObjectStorage
{
public function isSupported($object)
{
return ($object instanceof PDO);
}
}

$store = new MyObjectStorage();
$pdo = new PDO('dsn...');
$time = new DateTime();

$store->attach($pdo);
$store->attach($time); // throws "UnexpectedValueException"
```

Documentation
-------------

- [Installing][]
- [Usage][]

[Build Status]: https://secure.travis-ci.org/herrera-io/php-object-storage.png?branch=master
[Installing]: doc/00-Installing.md
[Usage]: doc/01-Usage.md