PHP code example of morebec / orkestra-postgresql-personal-information-store
1. Go to this page and download the library: Download morebec/orkestra-postgresql-personal-information-store 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/ */
morebec / orkestra-postgresql-personal-information-store example snippets
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\DriverManager;
use Morebec\Orkestra\PostgreSqlPersonalInformationStore\PostgreSqlPersonalInformationStore;
use Morebec\Orkestra\PostgreSqlPersonalInformationStore\PostgreSqlPersonalInformationStoreConfiguration;
$connection = DriverManager::getConnection([
'url' => '...'
], new Configuration());
$config = new PostgreSqlPersonalInformationStoreConfiguration();
$config->encryptionKey = PostgreSqlPersonalInformationStore::generateEncryptionKey(); // Or random_bytes(SODIUM_CRYPTO_SECRETBOX_KEYBYTES);
$store = new PostgreSqlPersonalInformationStore($connection,$config);
use Morebec\Orkestra\PostgreSqlPersonalInformationStore\DisposedPersonalDataRemover;
$remover = new DisposedPersonalDataRemover($store);
while(true) {
$remover->run();
sleep(60);
}