phpolar / phpolar-storage
This package is abandoned and no longer maintained.
The author suggests using the phpolar/storage package instead.
A convenient tool to speed up the creation of data storage for application development.
7.0.0
2025-06-02 01:50 UTC
Requires
- php: >=8.3
Requires (Dev)
- ext-ast: *
- ext-openssl: *
- phan/phan: ^5.4
- php-coveralls/php-coveralls: ^2.7.0
- phpmd/phpmd: ^2.15.0
- phpstan/phpstan: ^1.9 || ^2.0
- phpunit/phpunit: ^11.4.4 || ^12.0.0
- squizlabs/php_codesniffer: ^3.11.1
- dev-main
- 7.0.0
- 6.0.0
- 5.1.0
- 5.0.0
- 4.0.0
- 3.1.1
- 3.1.0
- 3.0.0
- 2.0.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- 0.6.1
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
- dev-dependabot/composer/phpunit/phpunit-12.3.11
- dev-dependabot/composer/squizlabs/php_codesniffer-4.0.0
- dev-dependabot/composer/phpunit/phpunit-12.3.10
- dev-release-docs
This package is auto-updated.
Last update: 2025-09-15 19:08:35 UTC
README
PHPolar Data Storage Abstraction
Use to create persistence layer repositories, services, etc. with improved type safety
Usage
class KafkaStorage extends AbstractStorage { public function __construct( // ... ) { parent::__construct($lifeCycleHooks); // ... } // ... } $key0 = uniqid(); $kafkaStorage->save($key0, $data); $result = $kafkaStorage->find($key0); $item0 = $result ->orElse(static function () { $this->logger->warn($notFoundMessage); return new ResourceNotFound(); } ) ->tryUnwrap() $numItems = $kafkaStorage->count(); $allItems = $kafkaStorage->findAll(); $kafka->remove($key0); $kafka->clear();