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();
-
Notifications
You must be signed in to change notification settings - Fork 0
A convenient tool to speed up the creation of data storage for application development.
License
phpolar/storage
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A convenient tool to speed up the creation of data storage for application development.
Resources
License
Security policy
Stars
Watchers
Forks
Packages 0
No packages published