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.
- Host: GitHub
- URL: https://github.com/kherge-archive/php-object-storage
- Owner: kherge-archive
- License: mit
- Archived: true
- Created: 2013-06-19T18:30:32.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-06-19T18:47:41.000Z (over 12 years ago)
- Last Synced: 2025-06-08T22:26:45.276Z (7 months ago)
- Language: PHP
- Size: 113 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-php-cn - 官网
- awesome-php - PHP Object Storage - 一个用于对象存储的库 (数据结构和存储( Data Structure and Storage ))
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