You are here

protected function ConstraintValidator::formatValues in Plug 7

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

lib/Symfony/validator/Symfony/Component/Validator/ConstraintValidator.php, line 208

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