PasswordPolicy
Password policy class which holds information about configured password validators and password requirements
Table of Contents
Properties
- $action : PasswordPolicyAction
- $validators : array<string|int, AbstractPasswordValidator>
Methods
- __construct() : mixed
- getAction() : PasswordPolicyAction
- getRequirements() : array<string|int, mixed>
- Returns an array with requirements (e.g. ["Password must at least contain one char"]) for all configured password validators. The structure of the array is as following:
- getValidators() : array<string|int, mixed>
- hasValidators() : bool
Properties
$action
protected
PasswordPolicyAction
$action
$validators
protected
array<string|int, AbstractPasswordValidator>
$validators
= []
Methods
__construct()
public
__construct(array<AbstractPasswordValidator>, array<string, mixed>> $validators, PasswordPolicyAction $action) : mixed
Parameters
- $validators : array<AbstractPasswordValidator>, array<string, mixed>>
- $action : PasswordPolicyAction
getAction()
public
getAction() : PasswordPolicyAction
Return values
PasswordPolicyActiongetRequirements()
Returns an array with requirements (e.g. ["Password must at least contain one char"]) for all configured password validators. The structure of the array is as following:
public
getRequirements() : array<string|int, mixed>
['classId.validatorId' => 'Requirement text']
Return values
array<string|int, mixed>getValidators()
public
getValidators() : array<string|int, mixed>
Return values
array<string|int, mixed>hasValidators()
public
hasValidators() : bool