interface ObjectValidatorInterface implements ValidatorInterface (View source)

Contract for a validator

Methods

validate(mixed $value)

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

array
getOptions()

Returns the options of this validator which can be specified in the constructor

void
setValidatedInstancesContainer(SplObjectStorage $validatedInstancesContainer)

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

Details

Result validate(mixed $value)

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

Parameters

mixed $value

The value that should be validated

Return Value

Result

array getOptions()

Returns the options of this validator which can be specified in the constructor

Return Value

array

void setValidatedInstancesContainer(SplObjectStorage $validatedInstancesContainer)

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

Parameters

SplObjectStorage $validatedInstancesContainer

A container to keep track of validated instances

Return Value

void