![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/vendor/symfony/validator/Validator/ |
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Validator; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; /** * Validates PHP values against constraints. * * @author Bernhard Schussek <[email protected]> */ interface ValidatorInterface extends MetadataFactoryInterface { /** * Validates a value against a constraint or a list of constraints. * * If no constraint is passed, the constraint * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. * * @param mixed $value The value to validate * @param Constraint|Constraint[] $constraints The constraint(s) to validate against * @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation * succeeded */ public function validate($value, $constraints = null, $groups = null); /** * Validates a property of an object against the constraints specified * for this property. * * @param string $propertyName The name of the validated property * @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation * succeeded */ public function validateProperty(object $object, string $propertyName, $groups = null); /** * Validates a value against the constraints specified for an object's * property. * * @param object|string $objectOrClass The object or its class name * @param string $propertyName The name of the property * @param mixed $value The value to validate against the property's constraints * @param string|GroupSequence|array<string|GroupSequence>|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation * succeeded */ public function validatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null); /** * Starts a new validation context and returns a validator for that context. * * The returned validator collects all violations generated within its * context. You can access these violations with the * {@link ContextualValidatorInterface::getViolations()} method. * * @return ContextualValidatorInterface */ public function startContext(); /** * Returns a validator in the given execution context. * * The returned validator adds all generated violations to the given * context. * * @return ContextualValidatorInterface */ public function inContext(ExecutionContextInterface $context); }