public function doFinalInitialization()
    {
        // add the referrers for the foreign keys
        $this->setupTableReferrers();

        // execute database behaviors
        foreach ($this->getBehaviors() as $behavior) {
            $behavior->modifyDatabase();
        }

        // execute table behaviors (may add new tables and new behaviors)
        while ($behavior = $this->getNextTableBehavior()) {
            $behavior->getTableModifier()->modifyTable();
            $behavior->setTableModified(true);
        }

        // do naming and heavy indexing
        foreach ($this->tables as $table) {
            $table->doFinalInitialization();
            // setup referrers again, since final initialization may have added columns
            $table->setupReferrers(true);
        }
    }
public function doFinalInitialization()
    {
        // add the referrers for the foreign keys
        $this->setupTableReferrers();

        // execute database behaviors
        foreach ($this->getBehaviors() as $behavior) {
            $behavior->modifyDatabase();
        }

        // execute table behaviors (may add new tables and new behaviors)
        while ($behavior = $this->getNextTableBehavior()) {
            $behavior->getTableModifier()->modifyTable();
            $behavior->setTableModified(true);
        }

        // do naming and heavy indexing
        foreach ($this->tables as $table) {
            $table->doFinalInitialization();
            // setup referrers again, since final initialization may have added columns
            $table->setupReferrers(true);
        }
    }
public function doFinalInitialization ( ) { // add the referrers for the foreign keys $ this -> setupTableReferrers ( ) ; // execute database behaviors foreach ( $ this -> getBehaviors ( ) as $ behavior ) { $ behavior -> modifyDatabase ( ) ; } // execute table behaviors (may add new tables and new behaviors) while ( $ behavior = $ this -> getNextTableBehavior ( ) ) { $ behavior -> getTableModifier ( ) -> modifyTable ( ) ; $ behavior -> setTableModified ( true ) ; } // do naming and heavy indexing foreach ( $ this -> tables as $ table ) { $ table -> doFinalInitialization ( ) ; // setup referrers again, since final initialization may have added columns $ table -> setupReferrers ( true ) ; } }
Finalizes the setup process.
Finalizes the setup process .