Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BlackHoleMetadataFactory.php

class BlackHoleMetadataFactory

Metadata factory that does not store metadata.

This implementation is useful if you want to validate values against constraints only and you don't need to add constraints to classes and properties.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

  • class \Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory implements \Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface

Expanded class hierarchy of BlackHoleMetadataFactory

File

vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php, line 26

Namespace

Symfony\Component\Validator\Mapping\Factory
View source
class BlackHoleMetadataFactory implements MetadataFactoryInterface {
    public function getMetadataFor(mixed $value) : MetadataInterface {
        throw new LogicException('This class does not support metadata.');
    }
    public function hasMetadataFor(mixed $value) : bool {
        return false;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
BlackHoleMetadataFactory::getMetadataFor public function Returns the metadata for the given value. Overrides MetadataFactoryInterface::getMetadataFor
BlackHoleMetadataFactory::hasMetadataFor public function Returns whether the class is able to return metadata for the given value. Overrides MetadataFactoryInterface::hasMetadataFor

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal