| 1 | <?php |
||
| 5 | class Concealer |
||
| 6 | { |
||
| 7 | const REGEX = '/[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})/i'; |
||
| 8 | |||
| 9 | /** @var string */ |
||
| 10 | protected $domain = 'example.com'; |
||
| 11 | |||
| 12 | public static function create() |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $domain |
||
| 19 | * |
||
| 20 | * @return $this |
||
| 21 | */ |
||
| 22 | public function domain(string $domain) |
||
| 28 | |||
| 29 | public function conceal(string $string): string |
||
| 41 | |||
| 42 | protected function extractEmails(string $string): array |
||
| 53 | } |
||
| 54 |