comparison vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
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 }