You are here

class BlackHoleMetadataFactory in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php \Symfony\Component\Validator\Mapping\BlackholeMetadataFactory
  2. 8 vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php \Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php \Symfony\Component\Validator\Mapping\Factory\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

Expanded class hierarchy of BlackHoleMetadataFactory

2 files declare their use of BlackHoleMetadataFactory
BlackholeMetadataFactory.php in vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php
BlackHoleMetadataFactoryTest.php in vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php

File

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

Namespace

Symfony\Component\Validator\Mapping\Factory
View source
class BlackHoleMetadataFactory implements MetadataFactoryInterface {

  /**
   * {@inheritdoc}
   */
  public function getMetadataFor($value) {
    throw new \LogicException('This class does not support metadata.');
  }

  /**
   * {@inheritdoc}
   */
  public function hasMetadataFor($value) {
    return false;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
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