* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** * @author Bernhard Schussek */ class AllValidator extends ConstraintValidator { /** * {@inheritdoc} */ public function validate($value, Constraint $constraint) { if (!$constraint instanceof All) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\All'); } if (null === $value) { return; } if (!is_array($value) && !$value instanceof \Traversable) { throw new UnexpectedTypeException($value, 'array or Traversable'); } $context = $this->context; $validator = $context->getValidator()->inContext($context); foreach ($value as $key => $element) { $validator->atPath('['.$key.']')->validate($element, $constraint->constraints); } } } __halt_compiler();----SIGNATURE:----qxsmeeDrFz1GECYjCIW90Yx7hYACIvTuGAWneBXstBih4za39LI6/gHlafmwvg/6c3okyAKRg7JeSf6WRfza5vmwmb9LUiWPfub/gLpVFUkEWQxoJfjnR41opOq1g+gpx6EpFTR4d5xauRVCWKgdMxxzJlNUyI4gq2B2lOnCy82W5PkfnhhQpLDkKqXcAK+KjPqeuI2Fi+4zspDlM3tIwJjlKByeqnst8CtGLDimHHog1N2ShqHT1SgYZC3A6kb02enBn+FzzIh2CrofSx7iYM/SbiLj6gqbQebEG36hLknAOTyPHdMApckPrHvbPcL0eVY7Tf7oEmKK6L8o2p9GIImgLqJt1crDdLOxkTN7BDM4f7b2wKyk+Mb+hQ598C+2mRZiTf+onCmnSaj2OgdS348f5ZcIe+YinScL19exXKomyU9Cz7Hzr2211V3omo39NaLONp390Xrjjj2c9JFtZfTkaJS7qVAS2rz9643VpRW0GVXLyVK5NNQ0drk9BTrpv2nPyXnRa6oqH3PZT5ORJ0R7/WjDZtDtCOCe1K96OiYyyJakplPs4ESMyC+88HnZJbauo5oVOG2DLTK/+gKd6+qNxS8CFQJLR/ZV+4iWEAlCSU7BmAAma1gQrAE2X6gRncJjyOBeVqlOrUxNy4XN9jN3Y42F6ZO3w1ejQC3AlbQ=----ATTACHMENT:----MTEzMjg3NTcxMTIzNjI3NSA4NTIyMjcxOTkyODc4NjQwIDc5MTk1NDAxMjg3NTMwMjQ=