/** * 入库前自动处理 */ public function beforeSave() { parent::beforeSave(); $this->tags && ($this->tags = str_replace(array(',', ', ', ' ,', ' '), ',', $this->tags)); $this->title_alias && ($this->title_alias = str_replace(array(' ', ', ', ' ,'), '-', $this->title_alias)); return true; }
public function beforeSave() { $this->password = $this->hashPassword($this->password); return parent::beforeSave(); }
/** * 入库前自动处理 */ public function beforeSave() { parent::beforeSave(); return true; }