src/Tomahawk/Bundle/DoctrineBundle/Mapping/DisconnectedMetadataFactory.php
public function getNamespaceMetadata($namespace, $path = null)
    {
        $metadata = $this->getMetadataForNamespace($namespace);
        if (!$metadata->getMetadata()) {
            throw new \RuntimeException(sprintf('Namespace "%s" does not contain any mapped entities.', $namespace));
        }

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

        return $metadata;
    }
public function getNamespaceMetadata($namespace, $path = null)
    {
        $metadata = $this->getMetadataForNamespace($namespace);
        if (!$metadata->getMetadata()) {
            throw new \RuntimeException(sprintf('Namespace "%s" does not contain any mapped entities.', $namespace));
        }

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

        return $metadata;
    }
Gets the metadata of all classes of a namespace.

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

@return ClassMetadataCollection A ClassMetadataCollection instance

@throws \RuntimeException When namespace not contain mapped entities