You are here

protected function ConstraintValidator::formatValues in Zircon Profile 8

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

Returns a string representation of a list of values.

Each of the values is converted to a string using {@link formatValue()}. The values are then concatenated with commas.

Parameters

array $values A list of values:

int $format A bitwise combination of the format: constants in this class

Return value

string The string representation of the value list

See also

formatValue()

File

vendor/symfony/validator/ConstraintValidator.php, line 210

Class

ConstraintValidator
Base class for constraint validators.

Namespace

Symfony\Component\Validator

Code

protected function formatValues(array $values, $format = 0) {
  foreach ($values as $key => $value) {
    $values[$key] = $this
      ->formatValue($value, $format);
  }
  return implode(', ', $values);
}