Esempio n. 1
0
 public function getTables()
 {
     $tables = new StructureBag();
     foreach ($this->getRawTableNames() as $rawTable) {
         $tableName = $rawTable[array_keys($rawTable)[0]];
         $tables->append(Table::create($this, $tableName));
     }
     return $tables;
 }
Esempio n. 2
0
 public static function import($input)
 {
     $rowSnapshot = Yaml::parse($input);
     $tables = new StructureBag();
     $views = new StructureBag();
     $rows = new StructureBag();
     foreach ($rowSnapshot['tables'] as $table) {
         $tables->append(Table::import($table));
     }
     return new static($rowSnapshot['basic'], $tables, $views, $rows);
 }