You are here

public function ClassMetadata::addPropertyConstraints in Plug 7

Parameters

string $property:

Constraint[] $constraints:

Return value

ClassMetadata

File

lib/Symfony/validator/Symfony/Component/Validator/Mapping/ClassMetadata.php, line 285

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