1. Go to this page and download the library: Download rafalmasiarek/php-kv 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/ */
interface StorageInterface
{
public function load(string $scope, string $id): ?array;
public function save(string $scope, string $id, array $document): void;
public function delete(string $scope, string $id): void;
}
use rafalmasiarek\KV;
use rafalmasiarek\KV\Storage\FileStorage;
$kv = new KV(new FileStorage(__DIR__ . '/var/kv'));
// Set
$kv->set('app', 'flags', 'new_ui', true);
// Get
if ($kv->get('app', 'flags', 'new_ui')) {
// ...
}
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.