You are here

private static function LegacyValidator::testConstraints in Plug 7

1 call to LegacyValidator::testConstraints()
LegacyValidator::validate in lib/Symfony/validator/Symfony/Component/Validator/Validator/LegacyValidator.php
Validates a value against a constraint or a list of constraints.

File

lib/Symfony/validator/Symfony/Component/Validator/Validator/LegacyValidator.php, line 70

Class

LegacyValidator
A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+.

Namespace

Symfony\Component\Validator\Validator

Code

private static function testConstraints($constraints) {
  return null === $constraints || $constraints instanceof Constraint || is_array($constraints) && current($constraints) instanceof Constraint;
}