Documentation

ClientValidator extends PersonValidator
in package

Validator is a singleton base class for classes validating DomainObjects.

Table of Contents

$instance  : AbstractValidator
Stores the single instance of Validator.
$validators  : array<string|int, callable>
Needs to be declared in every childclass
getInstance()  : Validator
Returnst the instances of the validator, instantiates a new one if there isn't one already.
getValidators()  : mixed
Returns the validator functions.
validate()  : ResultCollection|bool
Validates a DomainObject.
__construct()  : mixed
Implement constructor in childclasses and assign the validator functions to using setValidators() All sub-classes should have protected constructors.
setValidators()  : mixed
Sets the validator functions.

Properties

$validators

Needs to be declared in every childclass

protected array<string|int, callable> $validators = []

A list of tests used to validate domainObjects dataTypes, indexed by fieldname

Methods

getInstance()

Returnst the instances of the validator, instantiates a new one if there isn't one already.

public static getInstance() : Validator
Return values
Validator

getValidators()

Returns the validator functions.

public getValidators() : mixed
Return values
mixed

__construct()

Implement constructor in childclasses and assign the validator functions to using setValidators() All sub-classes should have protected constructors.

protected __construct() : mixed
Return values
mixed

setValidators()

Sets the validator functions.

protected setValidators(mixed $tests) : mixed
Parameters
$tests : mixed
Return values
mixed

Search results