public function start()
    {
        $tablesAndViews = $this->dataBase->showTables($this->prefix);
        $this->tables = $tablesAndViews['tables'];
        $this->views = $tablesAndViews['views'];

        $this->foreignKeys['all'] = $this->dataBase->getAllForeignKeys();
        $this->foreignKeys['ordered'] = $this->getAllForeignKeysOrderedByTable();

        foreach ($this->tables as $key => $table) {
            $this->describes[$table] = $this->dataBase->describeTable($table);

            if ($this->isManyToMany($table, true)) {
                $this->junctionTables[] = $table;
                unset($this->tables[$key]);
            }
        }
        unset($table);

        foreach ($this->tables as $table) {
            $model = new Model();
            $model->buildModel(
                $table,
                $this->baseModel,
                $this->describes,
                $this->foreignKeys,
                $this->namespace,
                $this->prefix
            );

            $model->createModel();

            $result = $this->writeFile($table, $model);

            echo 'file written: '.$result['filename'].' - '.$result['result'].' bytes'.BR;
            flush();
        }
        echo 'done'.BR;
    }
public function start()
    {
        $tablesAndViews = $this->dataBase->showTables($this->prefix);
        $this->tables = $tablesAndViews['tables'];
        $this->views = $tablesAndViews['views'];

        $this->foreignKeys['all'] = $this->dataBase->getAllForeignKeys();
        $this->foreignKeys['ordered'] = $this->getAllForeignKeysOrderedByTable();

        foreach ($this->tables as $key => $table) {
            $this->describes[$table] = $this->dataBase->describeTable($table);

            if ($this->isManyToMany($table, true)) {
                $this->junctionTables[] = $table;
                unset($this->tables[$key]);
            }
        }
        unset($table);

        foreach ($this->tables as $table) {
            $model = new Model();
            $model->buildModel(
                $table,
                $this->baseModel,
                $this->describes,
                $this->foreignKeys,
                $this->namespace,
                $this->prefix
            );

            $model->createModel();

            $result = $this->writeFile($table, $model);

            echo 'file written: '.$result['filename'].' - '.$result['result'].' bytes'.BR;
            flush();
        }
        echo 'done'.BR;
    }
public function start ( ) { $ tablesAndViews = $ this -> dataBase -> showTables ( $ this -> prefix ) ; $ this -> tables = $ tablesAndViews [ 'tables' ] ; $ this -> views = $ tablesAndViews [ 'views' ] ; $ this -> foreignKeys [ 'all' ] = $ this -> dataBase -> getAllForeignKeys ( ) ; $ this -> foreignKeys [ 'ordered' ] = $ this -> getAllForeignKeysOrderedByTable ( ) ; foreach ( $ this -> tables as $ key => $ table ) { $ this -> describes [ $ table ] = $ this -> dataBase -> describeTable ( $ table ) ; if ( $ this -> isManyToMany ( $ table , true ) ) { $ this -> junctionTables [ ] = $ table ; unset ( $ this -> tables [ $ key ] ) ; } } unset ( $ table ) ; foreach ( $ this -> tables as $ table ) { $ model = new Model ( ) ; $ model -> buildModel ( $ table , $ this -> baseModel , $ this -> describes , $ this -> foreignKeys , $ this -> namespace , $ this -> prefix ) ; $ model -> createModel ( ) ; $ result = $ this -> writeFile ( $ table , $ model ) ; echo 'file written: ' . $ result [ 'filename' ] . ' - ' . $ result [ 'result' ] . ' bytes' . BR ; flush ( ) ; } echo 'done' . BR ; }
This is where we start.

@throws Exception
This is where we start .