protected function getBundleName($path)
    {
        if (is_dir($path)) {
            $finder = new Finder();
            $bundles = $finder->files()->depth(0)->name('*Bundle.php')->in($path);
            foreach ($bundles as $bundle) {
                return basename($bundle->getFilename(), 'Bundle.php');
            }
        }

        return null;
    }
protected function getBundleName($path)
    {
        if (is_dir($path)) {
            $finder = new Finder();
            $bundles = $finder->files()->depth(0)->name('*Bundle.php')->in($path);
            foreach ($bundles as $bundle) {
                return basename($bundle->getFilename(), 'Bundle.php');
            }
        }

        return null;
    }
protected function getBundleName ( $ path ) { if ( is_dir ( $ path ) ) { $ finder = new Finder ( ) ; $ bundles = $ finder -> files ( ) -> depth ( 0 ) -> name ( '*Bundle.php' ) -> in ( $ path ) ; foreach ( $ bundles as $ bundle ) { return basename ( $ bundle -> getFilename ( ) , 'Bundle.php' ) ; } } return null ; }
Retrieves the current bundle class

@param string $path The bundle's path
@return string
Retrieves the current bundle class