public function getBundleMetadata(BundleInterface $bundle)
    {
        $namespace = $bundle->getNamespace();
        $metadata = $this->getMetadataForNamespace($namespace);
        if (!$metadata->getMetadata()) {
            throw new \RuntimeException(sprintf('Bundle "%s" does not contain any mapped entities.', $bundle->getName()));
        }

        $path = $this->getBasePathForClass($bundle->getName(), $bundle->getNamespace(), $bundle->getPath());

        $metadata->setPath($path);
        $metadata->setNamespace($bundle->getNamespace());

        return $metadata;
    }
public function getBundleMetadata(BundleInterface $bundle)
    {
        $namespace = $bundle->getNamespace();
        $metadata = $this->getMetadataForNamespace($namespace);
        if (!$metadata->getMetadata()) {
            throw new \RuntimeException(sprintf('Bundle "%s" does not contain any mapped entities.', $bundle->getName()));
        }

        $path = $this->getBasePathForClass($bundle->getName(), $bundle->getNamespace(), $bundle->getPath());

        $metadata->setPath($path);
        $metadata->setNamespace($bundle->getNamespace());

        return $metadata;
    }
public function getBundleMetadata ( BundleInterface $ bundle ) { $ namespace = $ bundle -> getNamespace ( ) ; $ metadata = $ this -> getMetadataForNamespace ( $ namespace ) ; if ( ! $ metadata -> getMetadata ( ) ) { throw new \ RuntimeException ( sprintf ( 'Bundle "%s" does not contain any mapped entities.' , $ bundle -> getName ( ) ) ) ; } $ path = $ this -> getBasePathForClass ( $ bundle -> getName ( ) , $ bundle -> getNamespace ( ) , $ bundle -> getPath ( ) ) ; $ metadata -> setPath ( $ path ) ; $ metadata -> setNamespace ( $ bundle -> getNamespace ( ) ) ; return $ metadata ; }
Gets the metadata of all classes of a bundle.

@param BundleInterface $bundle A BundleInterface instance

@return ClassMetadataCollection A ClassMetadataCollection instance

@throws \RuntimeException When bundle does not contain mapped entities
Gets the metadata of all classes of a bundle .