PHP Интерфейс Symfony\Component\Validator\ValidatorInterface

Устаревший: since version 2.5, to be removed in 3.0. Use {@link \Symfony\Component\Validator\Validator\ValidatorInterface} instead.
Автор: Bernhard Schussek ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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.

Описание методов

getMetadataFactory() публичный Метод

Returns the factory for ClassMetadata instances
public getMetadataFactory ( ) : Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface
Результат Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface

validate() публичный Метод

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
Результат ConstraintViolationList

validateProperty() публичный Метод

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
Результат ConstraintViolationList

validatePropertyValue() публичный Метод

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
Результат ConstraintViolationList

validateValue() публичный Метод

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
Результат ConstraintViolationList