Exemplo n.º 1
0
 /**
  * cria um Array com nome das tabelas
  */
 public function parseTables()
 {
     if ($this->hasTables()) {
         return $this->getAllTables();
     }
     foreach ($this->getListColumns() as $table) {
         $schema = $table['table_schema'];
         $key = $table['table_name'];
         if (!$this->hasTable($key, $schema)) {
             $this->createTable($key, $schema);
         }
         $column = Column::getInstance()->populate(array('name' => $table['column_name'], 'type' => $this->convertTypeToSimple($table['data_type']), 'nullable' => is_string($table['is_nullable']) && strtolower($table['is_nullable']) != 'no', 'max_length' => $table['max_length']));
         $this->getTable($key, $schema)->addColumn($column)->setNamespace($this->config->createClassNamespace($this->getTable($key, $schema)));
     }
 }