555bea9aa21e5f8ebd1b756f4e8b5bf0a9a11719
[yaffs-website] / vendor / symfony / validator / MetadataFactoryInterface.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;
13
14 /**
15  * Returns {@link MetadataInterface} instances for values.
16  *
17  * @author Bernhard Schussek <bschussek@gmail.com>
18  *
19  * @deprecated since version 2.5, to be removed in 3.0.
20  *             Use {@link Mapping\Factory\MetadataFactoryInterface} instead.
21  */
22 interface MetadataFactoryInterface
23 {
24     /**
25      * Returns the metadata for the given value.
26      *
27      * @param mixed $value Some value
28      *
29      * @return MetadataInterface The metadata for the value
30      *
31      * @throws Exception\NoSuchMetadataException If no metadata exists for the given value
32      */
33     public function getMetadataFor($value);
34
35     /**
36      * Returns whether the class is able to return metadata for the given value.
37      *
38      * @param mixed $value Some value
39      *
40      * @return bool Whether metadata can be returned for that value
41      */
42     public function hasMetadataFor($value);
43 }