You are here

protected function RecursiveContextualValidator::normalizeGroups in Zircon Profile 8

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

Normalizes the given group or list of groups to an array.

Parameters

mixed $groups The groups to normalize:

Return value

array A group array

3 calls to RecursiveContextualValidator::normalizeGroups()
RecursiveContextualValidator::validate in vendor/symfony/validator/Validator/RecursiveContextualValidator.php
Validates a value against a constraint or a list of constraints.
RecursiveContextualValidator::validateProperty in vendor/symfony/validator/Validator/RecursiveContextualValidator.php
Validates a property of an object against the constraints specified for this property.
RecursiveContextualValidator::validatePropertyValue in vendor/symfony/validator/Validator/RecursiveContextualValidator.php
Validates a value against the constraints specified for an object's property.

File

vendor/symfony/validator/Validator/RecursiveContextualValidator.php, line 311

Class

RecursiveContextualValidator
Recursive implementation of {@link ContextualValidatorInterface}.

Namespace

Symfony\Component\Validator\Validator

Code

protected function normalizeGroups($groups) {
  if (is_array($groups)) {
    return $groups;
  }
  return array(
    $groups,
  );
}