wobeto/email-blur

A library to e-mail blur

1.0.0 2021-06-05 01:11 UTC

This package is auto-updated.

Last update: 2024-11-05 08:20:09 UTC


README

To install via composer, run:

composer require wobeto/email-blur

Use with default mask:

<?php

include 'vendor/autoload.php';

use Wobeto\EmailBlur\Blur;

$blur = new Blur('example@test.com');
    
$obscured = $blur->make();

var_dump($obscured); // exa***@***.com

Use with total mask changed:

<?php

include 'vendor/autoload.php';

use Wobeto\EmailBlur\Blur;

$blur = new Blur('example@test.com');
$blur->setTotalMask(5);
    
$obscured = $blur->make();

var_dump($obscured); // exa*****@*****.com

Use with chaining methods:

<?php

include 'vendor/autoload.php';

use Wobeto\EmailBlur\Blur;

$obscured = (new Blur('example@test.com'))
    ->setTotalMask(4)
    ->make();

var_dump($obscured); // exa****@****.com

Use with show domain option:

<?php

include 'vendor/autoload.php';

use Wobeto\EmailBlur\Blur;

$obscured = (new Blur('example@test.com'))
    ->showDomain()
    ->make();

var_dump($obscured); // exa***@test.com

Enjoy...