getAllFiles() публичный Метод

public getAllFiles ( $initialDirectory, string $regex = null ) : string[]
$regex string
Результат string[]
Пример #1
0
 /**
  * Builds a list of checks to run.
  */
 private function build()
 {
     foreach ($this->fileSystem->getAllFiles($this->getRootDirectory(), '/^.*\\.php$/') as $filePath) {
         require_once $filePath;
     }
     $this->checks = [];
     foreach (get_declared_classes() as $class) {
         $reflectionClass = new ReflectionClass($class);
         if ($this->canInstantiate($reflectionClass)) {
             $this->checks[] = $reflectionClass->newInstance();
         }
     }
 }
Пример #2
0
 /**
  * @param string $path
  *
  * @return \HippoPHP\Hippo\CheckResult[]
  */
 private function checkPathDirectory($path)
 {
     $iterator = $this->fileSystem->getAllFiles($path, '/^.+\\.php$/i');
     $results = [];
     foreach ($iterator as $subPath) {
         $results = array_merge($results, $this->checkPathFile($subPath));
     }
     return $results;
 }
Пример #3
0
 /**
  * @return string[]
  */
 private function _getAllStandardNames()
 {
     $result = [];
     $ymlFiles = $this->fileSystem->getAllFiles($this->_getStandardsFolder(), '/\\.yml$/');
     foreach ($ymlFiles as $ymlFilePath) {
         $result[] = basename($ymlFilePath, '.yml');
     }
     return $result;
 }