Returns the metadata for the given value.
mixed $value Some value.:
MetadataInterface The metadata for the value.
Exception\NoSuchMetadataException If no metadata exists for the value.
Overrides MetadataFactoryInterface::getMetadataFor
public function getMetadataFor($class) {
if (is_object($class)) {
$class = get_class($class);
}
if (!is_string($class)) {
throw new NoSuchMetadataException(sprintf('No metadata for type %s', gettype($class)));
}
if (!isset($this->metadatas[$class])) {
throw new NoSuchMetadataException(sprintf('No metadata for "%s"', $class));
}
return $this->metadatas[$class];
}