PHP code example of exs / bulk-email-checker-bundle

1. Go to this page and download the library: Download exs/bulk-email-checker-bundle 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/ */

    

exs / bulk-email-checker-bundle example snippets



// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new EXS\BulkEmailCheckerBundle\EXSBulkEmailCheckerBundle(),
        // ...
    );
}


// On any entity or model class.

use EXS\BulkEmailCheckerBundle\Validator\Constraints as ExsAssert;
// ...

class SomeClass
{
    // ...

    /**
     * @var string
     *
     * @ExsAssert\BulkEmailChecker()
     */
    private $email;
    
    // ...
}


// Dummy example

$email = '[email protected]';
$manager = $this->container->get('exs_bulk_email_checker.bulk_email_checker_manager');
$valid = $manager->validate($email); // boolean value