Author: Stuart Herbert (stuart.herbert@datasift.com)
Beispiel #1
0
 /**
  * build a list of the config files in the $searchFolder
  *
  * @return array<string>
  */
 protected function findConfigFilenames($searchPattern)
 {
     // where are we looking?
     $searchFolders = $this->getSearchFolders();
     // our return value
     $filenames = [];
     foreach ($searchFolders as $searchFolder) {
         // do we have somewhere to look?
         if (null === $searchFolder || !is_dir($searchFolder)) {
             continue;
         }
         // build our list
         $configFinder = new ConfigFinder();
         $filenames = array_merge($filenames, $configFinder->getListOfConfigFilesIn($searchFolder, $searchPattern));
     }
     // all done
     return $filenames;
 }