PHP code example of codeheures-fr / scrutineer

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

    

codeheures-fr / scrutineer example snippets


// config/bundles.php
return [
    // …
    CODEHeures\Scrutineer\Bridge\Symfony\ScrutineerBundle::class => ['all' => true],
];

// $posteToken = cookie httpOnly `scrutineer_poste` (posé par POST <prefix>/poste), présent sur la requête
$email->getHeaders()->addTextHeader('X-Scrutineer-Poste', $posteToken);
bash
php bin/console scrutineer:generate-migration
php bin/console doctrine:migrations:migrate
yaml
    mail_capture:
        enabled: true                    # off par défaut — la lib ne touche votre mailer que si activé
        domain: scrutineer.invalid       # destinataires @<domain> → capturés (seedez vos personas ainsi)
        table: scrutineer_captured_mail  # 2e (et seul autre) objet de schéma de la lib
        retention_days: 7                # purge auto au mint du jeton de poste (aucun cron)