Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Validator\Mapping\Factory; Chris@0: Chris@0: /** Chris@0: * Metadata factory that does not store metadata. Chris@0: * Chris@0: * This implementation is useful if you want to validate values against Chris@0: * constraints only and you don't need to add constraints to classes and Chris@0: * properties. Chris@0: * Chris@0: * @author Fabien Potencier Chris@0: */ Chris@0: class BlackHoleMetadataFactory implements MetadataFactoryInterface Chris@0: { Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function getMetadataFor($value) Chris@0: { Chris@0: throw new \LogicException('This class does not support metadata.'); Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function hasMetadataFor($value) Chris@0: { Chris@0: return false; Chris@0: } Chris@0: }