Example #1
0
 /**
  * Adds the mutator open body part
  * @param      string &$script The script will be modified in this method.
  * @param      Column $col The current column.
  * @see        addMutatorOpen()
  **/
 protected function addMutatorOpenBody(&$script, Column $col)
 {
     parent::addMutatorOpenBody($script, $col);
     $clo = strtolower($col->getName());
     if (in_array($clo, self::$systemColumns)) {
         return;
     }
     $fullColumnName = $this->getColumnConstant($col);
     $script .= "\n\t\tif(!isset(\$this->oldColumnsValues[{$fullColumnName}]))\n\t\t\t\$this->oldColumnsValues[{$fullColumnName}] = \$this->{$clo};\n";
 }