public function getClassMetadata($class, $path = null)
    {
        $metadata = $this->getMetadataForClass($class);
        if (! $metadata->getMetadata()) {
            throw MappingException::classIsNotAValidEntityOrMappedSuperClass($class);
        }

        $this->findNamespaceAndPathForMetadata($metadata, $path);

        return $metadata;
    }
public function getClassMetadata($class, $path = null)
    {
        $metadata = $this->getMetadataForClass($class);
        if (! $metadata->getMetadata()) {
            throw MappingException::classIsNotAValidEntityOrMappedSuperClass($class);
        }

        $this->findNamespaceAndPathForMetadata($metadata, $path);

        return $metadata;
    }
public function getClassMetadata ( $ class , $ path = null ) { $ metadata = $ this -> getMetadataForClass ( $ class ) ; if ( ! $ metadata -> getMetadata ( ) ) { throw MappingException :: classIsNotAValidEntityOrMappedSuperClass ( $ class ) ; } $ this -> findNamespaceAndPathForMetadata ( $ metadata , $ path ) ; return $ metadata ; }
Gets the metadata of a class.

@param string $class A class name
@param string $path  The path where the class is stored (if known)

@return ClassMetadataCollection A ClassMetadataCollection instance

@throws MappingException When class is not valid entity or mapped superclass.
Gets the metadata of a class .