public function modifyDatabase()
    {
        foreach ($this->getTables() as $table) {
            if ($table->hasBehavior($this->getId())) {
                // don't add the same behavior twice
                continue;
            }
            $behavior = clone $this;
            $table->addBehavior($behavior);
        }
    }
public function modifyDatabase()
    {
        foreach ($this->getTables() as $table) {
            if ($table->hasBehavior($this->getId())) {
                // don't add the same behavior twice
                continue;
            }
            $behavior = clone $this;
            $table->addBehavior($behavior);
        }
    }
public function modifyDatabase ( ) { foreach ( $ this -> getTables ( ) as $ table ) { if ( $ table -> hasBehavior ( $ this -> getId ( ) ) ) { // don't add the same behavior twice continue ; } $ behavior = clone $ this ; $ table -> addBehavior ( $ behavior ) ; } }
This method is automatically called on database behaviors when the
database model is finished.

Propagates the behavior to the tables of the database and override this
method to have a database behavior do something special.
This method is automatically called on database behaviors when the database model is finished .