5b38d0c98a775d65d4b5a6b515f3b5f9da767d40
[yaffs-website] / vendor / symfony / validator / Mapping / Factory / BlackHoleMetadataFactory.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Validator\Mapping\Factory;
13
14 /**
15  * Metadata factory that does not store metadata.
16  *
17  * This implementation is useful if you want to validate values against
18  * constraints only and you don't need to add constraints to classes and
19  * properties.
20  *
21  * @author Fabien Potencier <fabien@symfony.com>
22  */
23 class BlackHoleMetadataFactory implements MetadataFactoryInterface
24 {
25     /**
26      * {@inheritdoc}
27      */
28     public function getMetadataFor($value)
29     {
30         throw new \LogicException('This class does not support metadata.');
31     }
32
33     /**
34      * {@inheritdoc}
35      */
36     public function hasMetadataFor($value)
37     {
38         return false;
39     }
40 }