PHP Interface Symfony\Component\Validator\ValidatorInterface

Deprecation: since version 2.5, to be removed in 3.0. Use {@link \Symfony\Component\Validator\Validator\ValidatorInterface} instead.
Author: Bernhard Schussek ([email protected])
Show file Open project: pmjones/php-framework-benchmarks Interface Usage Examples

Public Methods

Method Description
getMetadataFactory ( ) : Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface Returns the factory for ClassMetadata instances
validate ( object $object, array | null $groups = null ) : ConstraintViolationList Validate the given object.
validateProperty ( object $object, string $property, array | null $groups = null ) : ConstraintViolationList Validate a single property of an object against its current value.
validatePropertyValue ( string $class, string $property, string $value, array | null $groups = null ) : ConstraintViolationList Validate a single property of an object against the given value.
validateValue ( mixed $value, Constraint $constraint, array | null $groups = null ) : ConstraintViolationList Validates a given value against a specific Constraint.

Method Details

getMetadataFactory() public method

Returns the factory for ClassMetadata instances
public getMetadataFactory ( ) : Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface
return Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface

validate() public method

Validate the given object.
public validate ( object $object, array | null $groups = null ) : ConstraintViolationList
$object object The object to validate
$groups array | null The validator groups to use for validating
return ConstraintViolationList

validateProperty() public method

Validate a single property of an object against its current value.
public validateProperty ( object $object, string $property, array | null $groups = null ) : ConstraintViolationList
$object object The object to validate
$property string The name of the property to validate
$groups array | null The validator groups to use for validating
return ConstraintViolationList

validatePropertyValue() public method

Validate a single property of an object against the given value.
public validatePropertyValue ( string $class, string $property, string $value, array | null $groups = null ) : ConstraintViolationList
$class string The class on which the property belongs
$property string The name of the property to validate
$value string
$groups array | null The validator groups to use for validating
return ConstraintViolationList

validateValue() public method

Validates a given value against a specific Constraint.
public validateValue ( mixed $value, Constraint $constraint, array | null $groups = null ) : ConstraintViolationList
$value mixed The value to validate
$constraint Constraint The constraint to validate against
$groups array | null The validator groups to use for validating
return ConstraintViolationList