public function MemberMetadata::accept

Implementation of the Visitor design pattern.

Calls {@link ValidationVisitorInterface::visit} and then forwards the <tt>accept()</tt>-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.:

Overrides MetadataInterface::accept

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Mapping/MemberMetadata.php, line 45

Class

MemberMetadata

Namespace

Symfony\Component\Validator\Mapping

Code

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());
  }
}