4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator;
15 * Returns {@link MetadataInterface} instances for values.
17 * @author Bernhard Schussek <bschussek@gmail.com>
19 * @deprecated since version 2.5, to be removed in 3.0.
20 * Use {@link Mapping\Factory\MetadataFactoryInterface} instead.
22 interface MetadataFactoryInterface
25 * Returns the metadata for the given value.
27 * @param mixed $value Some value
29 * @return MetadataInterface The metadata for the value
31 * @throws Exception\NoSuchMetadataException If no metadata exists for the given value
33 public function getMetadataFor($value);
36 * Returns whether the class is able to return metadata for the given value.
38 * @param mixed $value Some value
40 * @return bool Whether metadata can be returned for that value
42 public function hasMetadataFor($value);