interface GlobalExecutionContextInterface

Stores the node-independent state of a validation run.

When the validator validates a graph of objects, it uses two classes to store the state during the validation:

  • For each node in the validation graph (objects, properties, getters) the validator creates an instance of {@link ExecutionContextInterface} that stores the information about that node.
  • One single GlobalExecutionContextInterface stores the state that is independent of the current node.

Methods

getViolations()

Returns the violations generated by the validator so far.

mixed
getRoot()

Returns the value at which validation was started in the object graph.

getVisitor()

Returns the visitor instance used to validate the object graph nodes.

getValidatorFactory()

Returns the factory for constraint validators.

getMetadataFactory()

Returns the factory for validation metadata objects.

Details

at line line 37
ConstraintViolationListInterface getViolations()

Returns the violations generated by the validator so far.

Return Value

ConstraintViolationListInterface A list of constraint violations.

at line line 46
mixed getRoot()

Returns the value at which validation was started in the object graph.

Return Value

mixed The root value.

See also

ExecutionContextInterface::getRoot

at line line 53
ValidationVisitorInterface getVisitor()

Returns the visitor instance used to validate the object graph nodes.

Return Value

ValidationVisitorInterface The validation visitor.

at line line 60
ConstraintValidatorFactoryInterface getValidatorFactory()

Returns the factory for constraint validators.

Return Value

ConstraintValidatorFactoryInterface The constraint validator factory.

at line line 67
MetadataFactoryInterface getMetadataFactory()

Returns the factory for validation metadata objects.

Return Value

MetadataFactoryInterface The metadata factory.