You are here

public function GenericMetadata::addConstraints in Plug 7

Adds an list of constraints.

Parameters

Constraint[] $constraints The constraints to add:

Return value

GenericMetadata This object

File

lib/Symfony/validator/Symfony/Component/Validator/Mapping/GenericMetadata.php, line 173

Class

GenericMetadata
A generic container of {@link Constraint} objects.

Namespace

Symfony\Component\Validator\Mapping

Code

public function addConstraints(array $constraints) {
  foreach ($constraints as $constraint) {
    $this
      ->addConstraint($constraint);
  }
  return $this;
}