CodeUtil
in package
Table of Contents
Constants
- CAPITAL_LETTERS = 'capitalLetters'
- DEFAULT_ALLOWED_SPECIAL_CHARS = '[=<>()#/]'
- DEFAULT_ALPHABETS = [self::CAPITAL_LETTERS, self::SMALL_LETTERS, self::NUMBERS]
- DEFAULT_RULES = [self::CAPITAL_LETTERS, self::SMALL_LETTERS, self::NUMBERS]
- NUMBERS = 'numbers'
- SMALL_LETTERS = 'smallLetters'
- SPECIAL_CHARS = 'specialChars'
Properties
- $blnPreventAmbiguous : mixed
- $framework : ContaoFrameworkInterface
Methods
- __construct() : mixed
- generate() : mixed
- Generates a code by certain criteria.
Constants
CAPITAL_LETTERS
public
mixed
CAPITAL_LETTERS
= 'capitalLetters'
DEFAULT_ALLOWED_SPECIAL_CHARS
public
mixed
DEFAULT_ALLOWED_SPECIAL_CHARS
= '[=<>()#/]'
DEFAULT_ALPHABETS
public
mixed
DEFAULT_ALPHABETS
= [self::CAPITAL_LETTERS, self::SMALL_LETTERS, self::NUMBERS]
DEFAULT_RULES
public
mixed
DEFAULT_RULES
= [self::CAPITAL_LETTERS, self::SMALL_LETTERS, self::NUMBERS]
NUMBERS
public
mixed
NUMBERS
= 'numbers'
SMALL_LETTERS
public
mixed
SMALL_LETTERS
= 'smallLetters'
SPECIAL_CHARS
public
mixed
SPECIAL_CHARS
= 'specialChars'
Properties
$blnPreventAmbiguous
protected
static mixed
$blnPreventAmbiguous
= true
$framework
protected
ContaoFrameworkInterface
$framework
Methods
__construct()
public
__construct(ContaoFrameworkInterface $framework) : mixed
Parameters
- $framework : ContaoFrameworkInterface
generate()
Generates a code by certain criteria.
public
static generate([int $length = 8 ][, bool $preventAmbiguous = true ][, array<string|int, mixed> $alphabets = null ][, array<string|int, mixed> $rules = null ][, string $allowedSpecialChars = null ]) : mixed
Parameters
- $length : int = 8
- $preventAmbiguous : bool = true
- $alphabets : array<string|int, mixed> = null
- $rules : array<string|int, mixed> = null
- $allowedSpecialChars : string = null