ObjectValidatorInterface extends ValidatorInterface

Contract for a validator

Table of Contents

Methods

getOptions()  : array<string|int, mixed>
Returns the options of this validator which can be specified by setOptions().
setOptions()  : void
Receive validator options from framework.
setValidatedInstancesContainer()  : void
Allows to set a container to keep track of validated instances.
validate()  : Result
Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.

Methods

getOptions()

Returns the options of this validator which can be specified by setOptions().

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

setOptions()

Receive validator options from framework.

public setOptions(array<string|int, mixed> $options) : void
Parameters
$options : array<string|int, mixed>

setValidatedInstancesContainer()

Allows to set a container to keep track of validated instances.

public setValidatedInstancesContainer(SplObjectStorage $validatedInstancesContainer) : void
Parameters
$validatedInstancesContainer : SplObjectStorage

A container to keep track of validated instances

validate()

Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.

public validate(mixed $value) : Result
Parameters
$value : mixed

The value that should be validated

Return values
Result

        
On this page

Search results