PHP Class Symfony\Component\Validator\Context\ExecutionContext

See also: ExecutionContextInterface
Since: 2.5
Author: Bernhard Schussek ([email protected])
Inheritance: implements Symfony\Component\Validator\Context\ExecutionContextInterface
Mostrar archivo Open project: symfony/validator Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Validator\Validator\ValidatorInterface $validator, mixed $root, Symfony\Component\Translation\TranslatorInterface $translator, string | null $translationDomain = null ) Creates a new execution context.
addViolation ( $message, array $parameters = [] )
buildViolation ( $message, array $parameters = [] )
getClassName ( )
getConstraint ( )
getGroup ( )
getMetadata ( )
getObject ( )
getPropertyName ( )
getPropertyPath ( $subPath = '' )
getRoot ( )
getValidator ( )
getValue ( )
getViolations ( )
isConstraintValidated ( $cacheKey, $constraintHash )
isGroupValidated ( $cacheKey, $groupHash )
isObjectInitialized ( $cacheKey )
markConstraintAsValidated ( $cacheKey, $constraintHash )
markGroupAsValidated ( $cacheKey, $groupHash )
markObjectAsInitialized ( $cacheKey )
setConstraint ( Constraint $constraint )
setGroup ( $group )
setNode ( $value, $object, Symfony\Component\Validator\Mapping\MetadataInterface $metadata = null, $propertyPath )

Method Details

__construct() public method

Creates a new execution context.
public __construct ( Symfony\Component\Validator\Validator\ValidatorInterface $validator, mixed $root, Symfony\Component\Translation\TranslatorInterface $translator, string | null $translationDomain = null )
$validator Symfony\Component\Validator\Validator\ValidatorInterface The validator
$root mixed The root value of the validated object graph
$translator Symfony\Component\Translation\TranslatorInterface The translator
$translationDomain string | null The translation domain to use for translating violation messages

addViolation() public method

public addViolation ( $message, array $parameters = [] )
$parameters array

buildViolation() public method

public buildViolation ( $message, array $parameters = [] )
$parameters array

getClassName() public method

public getClassName ( )

getConstraint() public method

public getConstraint ( )

getGroup() public method

public getGroup ( )

getMetadata() public method

public getMetadata ( )

getObject() public method

public getObject ( )

getPropertyName() public method

public getPropertyName ( )

getPropertyPath() public method

public getPropertyPath ( $subPath = '' )

getRoot() public method

public getRoot ( )

getValidator() public method

public getValidator ( )

getValue() public method

public getValue ( )

getViolations() public method

public getViolations ( )

isConstraintValidated() public method

public isConstraintValidated ( $cacheKey, $constraintHash )

isGroupValidated() public method

public isGroupValidated ( $cacheKey, $groupHash )

isObjectInitialized() public method

public isObjectInitialized ( $cacheKey )

markConstraintAsValidated() public method

public markConstraintAsValidated ( $cacheKey, $constraintHash )

markGroupAsValidated() public method

public markGroupAsValidated ( $cacheKey, $groupHash )

markObjectAsInitialized() public method

public markObjectAsInitialized ( $cacheKey )

setConstraint() public method

public setConstraint ( Constraint $constraint )
$constraint Symfony\Component\Validator\Constraint

setGroup() public method

public setGroup ( $group )

setNode() public method

public setNode ( $value, $object, Symfony\Component\Validator\Mapping\MetadataInterface $metadata = null, $propertyPath )
$metadata Symfony\Component\Validator\Mapping\MetadataInterface