芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/lcobucci/jwt/src/Validation/Validator.php
checkConstraint($constraint, $token, $violations); } if ($violations) { throw RequiredConstraintsViolated::fromViolations(...$violations); } } /** @param ConstraintViolation[] $violations */ private function checkConstraint( Constraint $constraint, Token $token, array &$violations ) { try { $constraint->assert($token); } catch (ConstraintViolation $e) { $violations[] = $e; } } public function validate(Token $token, Constraint ...$constraints) { if ($constraints === []) { throw new NoConstraintsGiven('No constraint given.'); } try { foreach ($constraints as $constraint) { $constraint->assert($token); } return true; } catch (ConstraintViolation $e) { return false; } } }