PropertyMetadataInterface (Component\Validator)
Symfony\Component\Validator\PropertyMetadataInterface
interface PropertyMetadataInterface implements MetadataInterface
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) Implementation of the Visitor design pattern. | from MetadataInterface | |
Constraint[] | findConstraints(string $group) Returns all constraints for a given validation group. | from MetadataInterface |
string | getPropertyName() Returns the name of the property. | |
mixed | getPropertyValue(mixed $containingValue) Extracts the value of the property from the given container. |
Details
public accept(ValidationVisitorInterface $visitor, mixed $value, string|string[] $group, string $propertyPath)
Implementation of the Visitor design pattern.
Calls {@link ValidationVisitorInterface::visit} and then forwards the accept()-call to all property metadata instances.
public Constraint[] findConstraints(string $group)
Returns all constraints for a given validation group.
public string getPropertyName()
Returns the name of the property.
public mixed getPropertyValue(mixed $containingValue)
Extracts the value of the property from the given container.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Validator/PropertyMetadataInterface.html