original_string: public function setConstraints($constraints)
      {
          foreach ($constraints as $fieldName => $v) {
              if (is_array($v)) {
                  foreach ($v as $constraintFromArray) {
                      $this->setConstraint($fieldName, $constraintFromArray);
                  }
              } else {
                  $this->setConstraint($fieldName, $v);
              }
          }
  
          return $this;
      }
code: public function setConstraints($constraints)
      {
          foreach ($constraints as $fieldName => $v) {
              if (is_array($v)) {
                  foreach ($v as $constraintFromArray) {
                      $this->setConstraint($fieldName, $constraintFromArray);
                  }
              } else {
                  $this->setConstraint($fieldName, $v);
              }
          }
  
          return $this;
      }
code_tokens: public function setConstraints ( $ constraints ) { foreach ( $ constraints as $ fieldName => $ v ) { if ( is_array ( $ v ) ) { foreach ( $ v as $ constraintFromArray ) { $ this -> setConstraint ( $ fieldName , $ constraintFromArray ) ; } } else { $ this -> setConstraint ( $ fieldName , $ v ) ; } } return $ this ; }
docstring: setConstraints - sets multiple constraints on this validator
  
  @param array $constraints - $fieldName => ZenValidatorConstraint
  @return $this
docstring_tokens: setConstraints - sets multiple constraints on this validator