public function beforeValidate() { if (strlen($this->ip) > 0 and $this->address == '') { $this->address = gethostbyaddr($this->ip); } return parent::beforeValidate(); }
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); }
/** * 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); }