interface MetadataFactoryInterface

Returns {@link MetadataInterface} instances for values.

@author Bernhard Schussek <bschussek@gmail.com>

Hierarchy

Expanded class hierarchy of MetadataFactoryInterface

All classes that implement MetadataFactoryInterface

3 files declare their use of MetadataFactoryInterface
ClassMetadataFactory.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php
FakeMetadataFactory.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php
MetadataFactory.php in drupal/core/lib/Drupal/Core/TypedData/Validation/MetadataFactory.php
Contains \Drupal\Core\TypedData\Validation\MetadataFactory.

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/MetadataFactoryInterface.php, line 19

Namespace

Symfony\Component\Validator
View source
interface MetadataFactoryInterface {

  /**
   * Returns the metadata for the given value.
   *
   * @param mixed $value Some value.
   *
   * @return MetadataInterface The metadata for the value.
   *
   * @throws Exception\NoSuchMetadataException If no metadata exists for the value.
   */
  public function getMetadataFor($value);

  /**
   * Returns whether metadata exists for the given value.
   *
   * @param mixed $value Some value.
   *
   * @return Boolean Whether metadata exists for the value.
   */
  public function hasMetadataFor($value);

}

Members

Namesort descending Modifiers Type Description Overrides
MetadataFactoryInterface::getMetadataFor public function Returns the metadata for the given value. 3
MetadataFactoryInterface::hasMetadataFor public function Returns whether metadata exists for the given value. 3