PHP Class Doctrine\OrientDB\Query\Validator\AbstractValidator

Inheritance: implements Doctrine\OrientDB\Query\Validator\ValidatorInterface
Show file Open project: doctrine/orientdb-odm

Public Methods

Method Description
check ( mixed $value, boolean $silent = false ) : mixed Cleans and returns the $value.

Protected Methods

Method Description
clean ( mixed $value ) Internallly cleans and return the $value.
fail ( ValidationException $e, mixed $value, boolean $silent = false ) Makes the validator fail: if silent, null is returned, otherwise an exception is raised.

Method Details

check() public method

If it is invalid, the validator fails.
public check ( mixed $value, boolean $silent = false ) : mixed
$value mixed
$silent boolean
return mixed

clean() abstract protected method

Internallly cleans and return the $value.
abstract protected clean ( mixed $value )
$value mixed

fail() protected method

Makes the validator fail: if silent, null is returned, otherwise an exception is raised.
protected fail ( ValidationException $e, mixed $value, boolean $silent = false )
$e ValidationException
$value mixed
$silent boolean