示例#1
0
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         if ($this->isNewRecord) {
             $this->ticket = $this->createTicket();
             $this->ip = $this->retrieveClientIp();
         }
         return true;
     }
     return false;
 }
示例#2
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }