CoolCMS API

EmailHelper
in package

Table of Contents

Methods

fullMask()  : string
Masks an e-mail for display to others: `abc***@s*****.cz` (first three characters of the name, only the first for a short name; first character of the domain, whole suffix).
mask()  : string

Methods

fullMask()

Masks an e-mail for display to others: `abc***@s*****.cz` (first three characters of the name, only the first for a short name; first character of the domain, whole suffix).

public static fullMask(string $email) : string

A value that is not a valid e-mail (typically already masked abc***@s***.cz) is returned unchanged, so the mask is idempotent. The Api already masks the e-mail itself and templates that still call |maskEmail must not mask it twice.

Parameters
$email : string
Return values
string

mask()

public static mask(string $email[, int $charShownFront = 3 ][, int $charShownBack = 3 ]) : string
Parameters
$email : string
$charShownFront : int = 3
$charShownBack : int = 3
Return values
string
On this page

Search results