示例#1
0
 static function schema(array $load)
 {
     Modyllic_Tokenizer::on_advance(array("Modyllic_Status", "status"));
     try {
         $schema = Modyllic_Loader::load($load);
     } catch (Modyllic_Exception $e) {
         Modyllic_Status::clear_progress();
         Modyllic_Status::warn($e->getMessage() . "\n");
         if (Modyllic_Status::$debug) {
             Modyllic_Status::warn($e->getTraceAsString() . "\n");
         }
         exit(1);
     } catch (Modyllic_Loader_Exception $e) {
         Modyllic_Status::clear_progress();
         Modyllic_Status::warn($e->getMessage() . "\n");
         exit(1);
     } catch (Exception $e) {
         Modyllic_Status::clear_progress();
         throw $e;
     }
     Modyllic_Status::clear_progress();
     return $schema;
 }
示例#2
0
文件: Dir.php 项目: nmx/Modyllic
 static function load($dir, $schema)
 {
     $filelist = array_merge(glob("{$dir}/*.sql", GLOB_NOSORT), glob("{$dir}/*", GLOB_NOSORT | GLOB_ONLYDIR));
     natsort($filelist);
     Modyllic_Loader::load($filelist, $schema);
 }