class Spoofchecker (View source)

Constants

SINGLE_SCRIPT_CONFUSABLE

MIXED_SCRIPT_CONFUSABLE

WHOLE_SCRIPT_CONFUSABLE

ANY_CASE

SINGLE_SCRIPT

INVISIBLE

CHAR_LIMIT

ASCII

HIGHLY_RESTRICTIVE

MODERATELY_RESTRICTIVE

MINIMALLY_RESTRICTIVE

UNRESTRICTIVE

SINGLE_SCRIPT_RESTRICTIVE

MIXED_NUMBERS

HIDDEN_OVERLAY

IGNORE_SPACE Since: 8.4

CASE_INSENSITIVE Since: 8.4

ADD_CASE_MAPPINGS Since: 8.4

SIMPLE_CASE_INSENSITIVE Since: 8.4

Methods

__construct()

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Constructor

bool
isSuspicious(string $string, string $errorCode = null)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any suspicious characters

bool
areConfusable(string $string1, string $string2, int $errorCode = null)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any confusable characters

void
setAllowedLocales(string $locales)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Locales to use when running checks

void
setChecks(int $checks)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Set the checks to run

void
setRestrictionLevel(int $level)

No description

void
setAllowedChars(string $pattern, int $patternOptions = 0)

No description

Details

__construct()

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Constructor

bool isSuspicious(string $string, string $errorCode = null)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any suspicious characters

Parameters

string $string

string $errorCode

[optional]

Return Value

bool

bool areConfusable(string $string1, string $string2, int $errorCode = null)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any confusable characters

Parameters

string $string1

string $string2

int $errorCode

[optional]

Return Value

bool

void setAllowedLocales(string $locales)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Locales to use when running checks

Parameters

string $locales

Return Value

void

void setChecks(int $checks)

(PHP >= 5.4.0, PECL intl >= 2.0.0)
Set the checks to run

Parameters

int $checks

Return Value

void

void setRestrictionLevel(int $level)

No description

Parameters

int $level

Return Value

void

void setAllowedChars(string $pattern, int $patternOptions = 0)

Since: 8.4

No description

Parameters

string $pattern
int $patternOptions

Return Value

void