PHP code example of clntdev / scrubber

1. Go to this page and download the library: Download clntdev/scrubber 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/ */

    

clntdev / scrubber example snippets




use ClntDev\Scrubber\Handlers\FakerHandler;

return [
    'users' => [
        'first_name' => [
            'primary_key' => 'id',
            'value' => 'faker.firstName',
            'type' => 'pid',
        ],
        'last_name' => [
            'value' => 'faker.lastName',
            'type' => 'pid',
        ],
        'email' => [
            'value' => 'faker.email',
            'handler' => FakerHandler::class,
            'type' => 'pid',
        ],
        'toggle' => [
            'value' => static fn (): bool => true,
        ],
    ],
    'composite_table' => [
        'composite_field' => [
            'primary_key' => ['entity_id', 'deleted', 'delta', 'langcode'],
            'value' => 'string handler',
        ],
    ],
];

$scrubber = Scrubber::make('/path/to/config.php', $databaseClass, $loggerClass)