You are here

public function ExecutionContextInterface::getMetadata in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/ExecutionContextInterface.php \Symfony\Component\Validator\ExecutionContextInterface::getMetadata()

Returns the metadata for the currently validated value.

With the core implementation, this method returns a {@link Mapping\ClassMetadata} instance if the current value is an object, a {@link Mapping\PropertyMetadata} instance if the current value is the value of a property and a {@link Mapping\GetterMetadata} instance if the validated value is the result of a getter method.

If the validated value is neither of these, for example if the validator has been called with a plain value and constraint, this method returns null.

Return value

MetadataInterface|null The metadata of the currently validated value.

3 methods override ExecutionContextInterface::getMetadata()
ExecutionContext::getMetadata in vendor/symfony/validator/ExecutionContext.php
Returns the metadata for the currently validated value.
ExecutionContext::getMetadata in vendor/symfony/validator/Context/ExecutionContext.php
Returns the metadata for the currently validated value.
ExecutionContext::getMetadata in core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php
Returns the metadata for the currently validated value.

File

vendor/symfony/validator/ExecutionContextInterface.php, line 243

Class

ExecutionContextInterface
Stores the validator's state during validation.

Namespace

Symfony\Component\Validator

Code

public function getMetadata();