예제 #1
0
 /**
  * Gets the available theme paths from the given theme source.
  * Will only return valid package, namespace, view and asset paths
  * and nothing else.
  *
  * @param  string  $source
  * @return array   $paths
  */
 public function getThemePaths($source)
 {
     $patterns = array();
     $maxSectionDepth = $this->themeBag->getMaxSectionDepth();
     for ($i = $maxSectionDepth; $i >= 1; $i--) {
         $patterns[] = sprintf('/{%s}%s/{%s}', implode(',', array('packages', 'namespaces')), str_repeat('/*', $i), implode(',', array('views', 'assets')));
     }
     // Add a pattern for the views and assets folder directly beneath
     // the source
     $patterns[] = sprintf('/{%s}', implode(',', array('views', 'assets')));
     return $this->manipulatePathResults($source, $patterns, false);
 }