/**
  * Gets directories where the skeleton is stored for a generator class and a specific theme.
  *
  * @param string The generator class name
  * @param string The theme name
  *
  * @return array An array of directories
  */
 public function getGeneratorSkeletonDirs($class, $theme)
 {
     // if there is a configuration dimension
     if ($this->hasDimension()) {
         $cacheKey = sprintf('sf_generator_skeleton_dirs_%s_%s', $class, $theme);
         // if there is a cache return it
         if ($this->dimension->getCache()->has($cacheKey)) {
             $dirs = $this->dimension->getCache()->get($cacheKey);
         } else {
             $dimensions = $this->dimension->getCascade();
             // otherwise create and store
             $dirs = array();
             // project
             if (is_readable(sfConfig::get('sf_data_dir') . '/generator/' . $class . '/' . $theme . '/skeleton')) {
                 $dir = sfConfig::get('sf_data_dir') . '/generator/' . $class . '/' . $theme . '/skeleton';
                 // extend base dirs and add dimension cascade + checking dir exists
                 foreach ($dimensions as $dimension) {
                     if (is_readable($dir . '/' . $dimension)) {
                         array_push($dirs, $dir . '/' . $dimension);
                     }
                 }
                 array_push($dirs, $dir);
                 // project
             }
             if ($pluginDirs = glob(sfConfig::get('sf_plugins_dir') . '/*/data/generator/' . $class . '/' . $theme . '/skeleton')) {
                 foreach ($pluginDirs as $dir) {
                     foreach ($dimensions as $dimension) {
                         if (is_readable($dir . '/' . $dimension)) {
                             array_push($dirs, $dir . '/' . $dimension);
                         }
                     }
                     array_push($dirs, $dir);
                     // plugin
                 }
             }
             if ($bundledPluginDirs = glob(sfConfig::get('sf_symfony_lib_dir') . '/plugins/*/data/generator/' . $class . '/' . $theme . '/skeleton')) {
                 $dirs = array_merge($dirs, $bundledPluginDirs);
                 // bundled plugin
             }
             // save cache
             $this->dimension->getCache()->set($cacheKey, $dirs);
         }
     } else {
         $dirs = parent::getGeneratorSkeletonDirs($class, $theme);
     }
     return $dirs;
 }