You are here

public function ClassMetadata::addPropertyConstraints in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Mapping/ClassMetadata.php \Symfony\Component\Validator\Mapping\ClassMetadata::addPropertyConstraints()

Parameters

string $property:

Constraint[] $constraints:

Return value

ClassMetadata

File

vendor/symfony/validator/Mapping/ClassMetadata.php, line 287

Class

ClassMetadata
Default implementation of {@link ClassMetadataInterface}.

Namespace

Symfony\Component\Validator\Mapping

Code

public function addPropertyConstraints($property, array $constraints) {
  foreach ($constraints as $constraint) {
    $this
      ->addPropertyConstraint($property, $constraint);
  }
  return $this;
}