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\FactoryView 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 |