g4 / identity-map
identity-map php library
Installs: 55 074
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 10
Forks: 3
Open Issues: 0
Requires
- g4/profiler: >=1.10.0
Requires (Dev)
- g4/code-coverage: 1.*
- phpunit/phpunit: 5.*
- squizlabs/php_codesniffer: 3.*
README
identity-map - In-memory data store - php library
Install
composer require g4/identity-map
Usage
use G4\IdentityMap\IdentityMap; $identityMap = new IdentityMap(); $key = 'some_unique_key'; $data = 'some_data'; // add data $identityMap->set($key, $data); // retrieve data $data = $identityMap->get($key); // check if data is stored $identityMap->has($key); // remove data $identityMap->delete($key); // clear all $identityMap->clear();
Development
Install dependencies
composer install
Run tests
composer unit-test
License
(The MIT License) see LICENSE file for details...