interface ValidatableObjectInterface (View source)

The interface for all validatable objects. See ValidatableObjectTrait for implementation.

Methods

void
check()

Checks the object and throws an exception if validation failed.

getValidator()

Returns an instance of the constraint Validator class associated with this object.

bool
isValid()

Checks whether or not the object is valid.

array
validate()

Validates the object and returns the validation result.

Details

void check()

Checks the object and throws an exception if validation failed.

Return Value

void

Exceptions

ValidationFailedException

Validator getValidator()

Returns an instance of the constraint Validator class associated with this object.

Return Value

Validator

bool isValid()

Checks whether or not the object is valid.

Return Value

bool

array validate()

Validates the object and returns the validation result.

Return Value

array