Implementation of the Visitor design pattern.
Calls {@link ValidationVisitorInterface::visit} and then forwards the <tt>accept()</tt>-call to all property metadata instances.
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.:
Overrides MetadataInterface::accept
public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) {
$visitor
->visit($this, $value, $group, $propertyPath);
if ($this
->isCascaded()) {
$visitor
->validate($value, $propagatedGroup ?: $group, $propertyPath, $this
->isCollectionCascaded(), $this
->isCollectionCascadedDeeply());
}
}