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: use Symfony\Component\Validator\Exception\NoSuchMetadataException; Chris@0: use Symfony\Component\Validator\Mapping\MetadataInterface; Chris@0: Chris@0: /** Chris@0: * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: */ Chris@0: interface MetadataFactoryInterface Chris@0: { Chris@0: /** Chris@0: * Returns the metadata for the given value. Chris@0: * Chris@0: * @param mixed $value Some value Chris@0: * Chris@0: * @return MetadataInterface The metadata for the value Chris@0: * Chris@0: * @throws NoSuchMetadataException If no metadata exists for the given value Chris@0: */ Chris@0: public function getMetadataFor($value); Chris@0: Chris@0: /** Chris@0: * Returns whether the class is able to return metadata for the given value. Chris@0: * Chris@0: * @param mixed $value Some value Chris@0: * Chris@0: * @return bool Whether metadata can be returned for that value Chris@0: */ Chris@0: public function hasMetadataFor($value); Chris@0: }