Exemplo n.º 1
0
 public function beforeValidate()
 {
     if (strlen($this->ip) > 0 and $this->address == '') {
         $this->address = gethostbyaddr($this->ip);
     }
     return parent::beforeValidate();
 }
Exemplo n.º 2
0
 public function beforeSave($insert)
 {
     // @todo not sure why 'NOW()' is not working - DJE : 2015-05-29
     // $this->last_visit = date('Y-m-d H:m:i');
     return parent::beforeSave($insert);
 }
Exemplo n.º 3
0
 /**
  * Returns the static model of the specified AR class.
  * @param string $className active record class name.
  * @return BbiiSetting the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }