Exemplo n.º 1
0
 /**
  * 入库前自动处理
  */
 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;
 }
Exemplo n.º 2
0
 /**
  * 返回指定的AR类的静态模型.
  * Please note that you should have this exact method in all your CActiveRecord descendants!
  * @param string $className active record class name.
  * @return SendTpl the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
Exemplo n.º 3
0
 public function beforeSave()
 {
     $this->password = $this->hashPassword($this->password);
     return parent::beforeSave();
 }
Exemplo n.º 4
0
 /**
  * 入库前自动处理
  */
 public function beforeSave()
 {
     parent::beforeSave();
     return true;
 }