interface PropertyMetadataInterface implements MetadataInterface

deprecated since version 2.5, to be removed in 3.0. Use {@link Mapping\PropertyMetadataInterface} instead.

A container for validation metadata of a property.

What exactly you define as "property" is up to you. The validator expects implementations of {@link MetadataInterface} that contain constraints and optionally a list of named properties that also have constraints (and may have further sub properties). Such properties are mapped by implementations of this interface.

Methods

accept(ValidationVisitorInterface $visitor, mixed $value, string|string[] $group, string $propertyPath) deprecated

Implementation of the Visitor design pattern.

findConstraints(string $group)

Returns all constraints for a given validation group.

string
getPropertyName()

Returns the name of the property.

mixed
getPropertyValue(mixed $containingValue)

Extracts the value of the property from the given container.

Details

in MetadataInterface at line line 63
accept(ValidationVisitorInterface $visitor, mixed $value, string|string[] $group, string $propertyPath) deprecated

deprecated since version 2.5, to be removed in 3.0.

Implementation of the Visitor design pattern.

Calls {@link ValidationVisitorInterface::visit} and then forwards the accept()-call to all property metadata instances.

Parameters

ValidationVisitorInterface $visitor The visitor implementing the validation logic
mixed $value The value to validate
string|string[] $group The validation group to validate in
string $propertyPath The current property path in the validation graph

in MetadataInterface at line line 72
Constraint[] findConstraints(string $group)

Returns all constraints for a given validation group.

Parameters

string $group The validation group

Return Value

Constraint[] A list of constraint instances

at line line 36
string getPropertyName()

Returns the name of the property.

Return Value

string The property name.

at line line 45
mixed getPropertyValue(mixed $containingValue)

Extracts the value of the property from the given container.

Parameters

mixed $containingValue The container to extract the property value from.

Return Value

mixed The value of the property.