コード例 #1
0
ファイル: Log.php プロジェクト: chenyongze/d-a-m
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         $this->uid = Yii::app()->user->id;
         $this->uname = Yii::app()->user->name;
         $this->acttime = time();
         return true;
     } else {
         return false;
     }
 }
コード例 #2
0
ファイル: CardDs.php プロジェクト: chenyongze/d-a-m
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         $this->id = (int) $this->id;
         $this->database_id = (int) $this->database_id;
         return true;
     } else {
         return false;
     }
 }