Example #1
0
 /**
  * Getter for field's value
  * @param boolean $insert true is insert, false is update
  * @return mixed
  */
 public function getDbValue($insert)
 {
     if (!$this->isModified() && (($this->isAutoNow() || $this->isAutoNowAdd()) && $insert || $this->isAutoNow() && !$insert)) {
         $this->now();
         $this->modified = true;
     }
     return parent::getDbValue($insert);
 }