PHP code example of phpolar / storage
1. Go to this page and download the library: Download phpolar/storage library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phpolar / storage example snippets
class KafkaStorage extends AbstractStorage
{
public function __construct(
// ...
) {
parent::__construct();
// ...
}
// ...
}
$key0 = new ItemKey(uniqid());
$kafkaStorage->storeByKey($key0, $data);
$item0 = $kafkaStorage->getByKey($key0);
$numItems = $kafkaStorage->count();
$allItems = $kafkaStorage->getAll();
$kafka->removeByKey($key0);
$kafka->clear();