protected function addClassBody(&$script)
    {

        $table = $this->getTable();

        if (!$table->isAlias()) {
            $this->addConstantsAndAttributes($script);
        }

        $this->addTranslateFieldName($script);
        $this->addGetFieldNames($script);

        if ($table->hasEnumColumns()) {
            $this->addGetValueSets($script);
            $this->addGetValueSet($script);
            $this->addGetSqlValueForEnum($script);
        }

        if (!$table->isAlias()) {
            $this->addAlias($script); // alias() utility method (deprecated?)
            $this->addSelectMethods($script);
            $this->addGetTableMap($script);
        }

        $this->addBuildTableMap($script);

        $this->addGetOMClassMethod($script);

        // add the insert, update, delete, validate etc. methods
        if (!$table->isAlias() && !$table->isReadOnly()) {
            $this->addUpdateMethods($script);
        }

        if (count($table->getPrimaryKey()) > 0) {
            $this->addRetrieveByPKMethods($script);
        }
    }
protected function addClassBody(&$script)
    {

        $table = $this->getTable();

        if (!$table->isAlias()) {
            $this->addConstantsAndAttributes($script);
        }

        $this->addTranslateFieldName($script);
        $this->addGetFieldNames($script);

        if ($table->hasEnumColumns()) {
            $this->addGetValueSets($script);
            $this->addGetValueSet($script);
            $this->addGetSqlValueForEnum($script);
        }

        if (!$table->isAlias()) {
            $this->addAlias($script); // alias() utility method (deprecated?)
            $this->addSelectMethods($script);
            $this->addGetTableMap($script);
        }

        $this->addBuildTableMap($script);

        $this->addGetOMClassMethod($script);

        // add the insert, update, delete, validate etc. methods
        if (!$table->isAlias() && !$table->isReadOnly()) {
            $this->addUpdateMethods($script);
        }

        if (count($table->getPrimaryKey()) > 0) {
            $this->addRetrieveByPKMethods($script);
        }
    }
protected function addClassBody ( & $ script ) { $ table = $ this -> getTable ( ) ; if ( ! $ table -> isAlias ( ) ) { $ this -> addConstantsAndAttributes ( $ script ) ; } $ this -> addTranslateFieldName ( $ script ) ; $ this -> addGetFieldNames ( $ script ) ; if ( $ table -> hasEnumColumns ( ) ) { $ this -> addGetValueSets ( $ script ) ; $ this -> addGetValueSet ( $ script ) ; $ this -> addGetSqlValueForEnum ( $ script ) ; } if ( ! $ table -> isAlias ( ) ) { $ this -> addAlias ( $ script ) ; // alias() utility method (deprecated?) $ this -> addSelectMethods ( $ script ) ; $ this -> addGetTableMap ( $ script ) ; } $ this -> addBuildTableMap ( $ script ) ; $ this -> addGetOMClassMethod ( $ script ) ; // add the insert, update, delete, validate etc. methods if ( ! $ table -> isAlias ( ) && ! $ table -> isReadOnly ( ) ) { $ this -> addUpdateMethods ( $ script ) ; } if ( count ( $ table -> getPrimaryKey ( ) ) > 0 ) { $ this -> addRetrieveByPKMethods ( $ script ) ; } }
This method adds the contents of the generated class to the script.

This method contains the high-level logic that determines which methods
get generated.

Hint: Override this method in your subclass if you want to reorganize or
drastically change the contents of the generated peer class.

@param string &$script The script will be modified in this method.
This method adds the contents of the generated class to the script .