PasswordPolicy

Password policy class which holds information about configured password validators and password requirements

Internal

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

Methods

__construct()

public __construct(array<AbstractPasswordValidator>, array<string, mixed>> $validators, PasswordPolicyAction $action) : mixed
Parameters
$validators : array<AbstractPasswordValidator>, array<string, mixed>>
$action : PasswordPolicyAction

getRequirements()

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
Return values
bool

        
On this page

Search results