src/Kunstmaan/TranslatorBundle/Service/Command/Importer/ImportCommandHandler.php
public function validateBundleName($bundle)
    {
        // strtolower all bundle names
        $bundles = array_map('strtolower', array_keys($this->kernel->getBundles()));

        if (in_array(strtolower(trim($bundle)), $bundles)) {
            return true;
        }

        throw new \Exception(sprintf('bundle "%s" not found in available bundles: %s', $bundle, implode(', ', $bundles)));
    }
public function validateBundleName($bundle)
    {
        // strtolower all bundle names
        $bundles = array_map('strtolower', array_keys($this->kernel->getBundles()));

        if (in_array(strtolower(trim($bundle)), $bundles)) {
            return true;
        }

        throw new \Exception(sprintf('bundle "%s" not found in available bundles: %s', $bundle, implode(', ', $bundles)));
    }
public function validateBundleName ( $ bundle ) { // strtolower all bundle names $ bundles = array_map ( 'strtolower' , array_keys ( $ this -> kernel -> getBundles ( ) ) ) ; if ( in_array ( strtolower ( trim ( $ bundle ) ) , $ bundles ) ) { return true ; } throw new \ Exception ( sprintf ( 'bundle "%s" not found in available bundles: %s' , $ bundle , implode ( ', ' , $ bundles ) ) ) ; }
Validates that a bundle is registered in the AppKernel

@param string $bundle

@return bool bundle is valid or not

@throws \Exception If the bundlename isn't valid
Validates that a bundle is registered in the AppKernel