public function getBundleIdByBaseDir($path)
    {
        $bundleId = null;
        foreach ($this->bundleInfos as $id => $data) {
            if (0 === strpos($path, $data['base_dir'])) {
                $bundleId = $id;
                break;
            }
        }

        return $bundleId;
    }
public function getBundleIdByBaseDir($path)
    {
        $bundleId = null;
        foreach ($this->bundleInfos as $id => $data) {
            if (0 === strpos($path, $data['base_dir'])) {
                $bundleId = $id;
                break;
            }
        }

        return $bundleId;
    }
public function getBundleIdByBaseDir ( $ path ) { $ bundleId = null ; foreach ( $ this -> bundleInfos as $ id => $ data ) { if ( 0 === strpos ( $ path , $ data [ 'base_dir' ] ) ) { $ bundleId = $ id ; break ; } } return $ bundleId ; }
Returns bundle id if provided path is matched with any bundle base directory.

@param string $path

@return string
Returns bundle id if provided path is matched with any bundle base directory .