コード例 #1
0
ファイル: Loader.php プロジェクト: eddmash/powerorm
 /**
  * @return array
  *
  * @throws ClassNotFoundException
  *
  * @since 1.1.0
  *
  * @author Eddilbert Macharia (http://eddmash.com) <*****@*****.**>
  */
 public function getMigrationsClasses()
 {
     $migrationFiles = $this->getMigrationsFiles();
     $classes = [];
     $namespace = BaseOrm::getMigrationsNamespace();
     foreach ($migrationFiles as $migrationFile) {
         $className = ClassHelper::getClassNameFromFile($migrationFile, BaseOrm::getMigrationsPath());
         $foundClass = ClassHelper::classExists($className, $namespace);
         if (!$className) {
             throw new ClassNotFoundException(sprintf('The class [ %2$s\\%1$s or \\%1$s ] could not be located', $className, $namespace));
         }
         $classes[] = $foundClass;
     }
     return $classes;
 }