protected function addApplyDefaultValuesBody(&$script)
    {
        $table = $this->getTable();
        // FIXME - Apply support for PHP default expressions here
        // see: http://trac.propelorm.org/ticket/378

        $colsWithDefaults = array();
        foreach ($table->getColumns() as $col) {
            $def = $col->getDefaultValue();
            if ($def !== null && !$def->isExpression()) {
                $colsWithDefaults[] = $col;
            }
        }

        $colconsts = array();
        foreach ($colsWithDefaults as $col) {
            $clo = strtolower($col->getName());
            $defaultValue = $this->getDefaultValueString($col);
            $script .= "
        \$this->" . $clo . " = $defaultValue;";
        }
    }
protected function addApplyDefaultValuesBody(&$script)
    {
        $table = $this->getTable();
        // FIXME - Apply support for PHP default expressions here
        // see: http://trac.propelorm.org/ticket/378

        $colsWithDefaults = array();
        foreach ($table->getColumns() as $col) {
            $def = $col->getDefaultValue();
            if ($def !== null && !$def->isExpression()) {
                $colsWithDefaults[] = $col;
            }
        }

        $colconsts = array();
        foreach ($colsWithDefaults as $col) {
            $clo = strtolower($col->getName());
            $defaultValue = $this->getDefaultValueString($col);
            $script .= "
        \$this->" . $clo . " = $defaultValue;";
        }
    }
protected function addApplyDefaultValuesBody ( & $ script ) { $ table = $ this -> getTable ( ) ; // FIXME - Apply support for PHP default expressions here // see: http://trac.propelorm.org/ticket/378 $ colsWithDefaults = array ( ) ; foreach ( $ table -> getColumns ( ) as $ col ) { $ def = $ col -> getDefaultValue ( ) ; if ( $ def !== null && ! $ def -> isExpression ( ) ) { $ colsWithDefaults [ ] = $ col ; } } $ colconsts = array ( ) ; foreach ( $ colsWithDefaults as $ col ) { $ clo = strtolower ( $ col -> getName ( ) ) ; $ defaultValue = $ this -> getDefaultValueString ( $ col ) ; $ script .= "
        \$this->" . $ clo . " = $defaultValue;" ; } }
Adds the function body of the applyDefault method

@param string &$script The script will be modified in this method.

@see        addApplyDefaultValues()
Adds the function body of the applyDefault method