alex-kalanis / kw_storage
Universal storage library for store data as key-value pairs
Installs: 4 533
Dependents: 20
Suggesters: 13
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.4.0
- ext-mbstring: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: >=8 <=9
- shipmonk/composer-dependency-analyser: ^1.4
Suggests
- alex-kalanis/memcache-wrapper: PHP wrapper for questioning Memcache as file storage
- alex-kalanis/redis-wrapper: PHP wrapper for questioning Redis as file storage
README
Simple system for accessing key-value storages. Original is part of UploadPerPartes, where it's necessary for store states of upload.
PHP Installation
composer.phar require alex-kalanis/kw_storage
(Refer to Composer Documentation if you are not familiar with composer)
Changes
- 5.0 - Streams are on different level, not here
- 4.0 - Redefine factories and some key classes
- 3.0 - Redefine interfaces for targets
- 2.0 - Redefine Key-Value storing data
- Remove formats and cache support (that should not be a problem of storage)
- Added stream variant support
- Added interface for catching content with sub-content (so directories) on storage-level
- 1.0 - Initial version, with basics and cache support
PHP Usage
1.) Use your autoloader (if not already done via Composer autoloader)
2.) Add some external packages with connection to the local or remote services.
3.) Connect the "kalanis\kw_storage\Storage" or "kalanis\kw_storage\Helper" into your app. Extends it for setting your case, especially dirs.
4.) Extend your libraries by interfaces inside the package.
5.) Just use inside your app.
Notes
Listing output contains storage separators. Asked root record is empty, the rest has that separator at least on the beginning. It depends on storage and class if the listing came with complete tree with sub-entries or just first level.