You are here

interface MetadataInterface in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/MetadataInterface.php \Symfony\Component\Validator\MetadataInterface
  2. 8 vendor/symfony/validator/Mapping/MetadataInterface.php \Symfony\Component\Validator\Mapping\MetadataInterface
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Mapping/MetadataInterface.php \Symfony\Component\Validator\Mapping\MetadataInterface

A container for validation metadata.

Most importantly, the metadata stores the constraints against which an object and its properties should be validated.

Additionally, the metadata stores whether objects should be validated against their class' metadata and whether traversable objects should be traversed or not.

@since 2.5

@author Bernhard Schussek <bschussek@gmail.com>

Hierarchy

Expanded class hierarchy of MetadataInterface

All classes that implement MetadataInterface

See also

CascadingStrategy

TraversalStrategy

5 files declare their use of MetadataInterface
ExecutionContext.php in vendor/symfony/validator/Context/ExecutionContext.php
ExecutionContext.php in core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php
Contains \Drupal\Core\TypedData\Validation\ExecutionContext.
ExecutionContextInterface.php in vendor/symfony/validator/Context/ExecutionContextInterface.php
RecursiveContextualValidator.php in vendor/symfony/validator/Validator/RecursiveContextualValidator.php
TypedDataMetadata.php in core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php
Contains \Drupal\Core\TypedData\Validation\TypedDataMetadata.

File

vendor/symfony/validator/Mapping/MetadataInterface.php, line 34

Namespace

Symfony\Component\Validator\Mapping
View source
interface MetadataInterface extends LegacyMetadataInterface {

  /**
   * Returns the strategy for cascading objects.
   *
   * @return int The cascading strategy
   *
   * @see CascadingStrategy
   */
  public function getCascadingStrategy();

  /**
   * Returns the strategy for traversing traversable objects.
   *
   * @return int The traversal strategy
   *
   * @see TraversalStrategy
   */
  public function getTraversalStrategy();

  /**
   * Returns all constraints of this element.
   *
   * @return Constraint[] A list of Constraint instances
   */
  public function getConstraints();

}

Members

Namesort descending Modifiers Type Description Overrides
MetadataInterface::accept Deprecated public function Implementation of the Visitor design pattern. 2
MetadataInterface::findConstraints public function Returns all constraints for a given validation group. 2
MetadataInterface::getCascadingStrategy public function Returns the strategy for cascading objects. 2
MetadataInterface::getConstraints public function Returns all constraints of this element. 2
MetadataInterface::getTraversalStrategy public function Returns the strategy for traversing traversable objects. 2