コード例 #1
0
ファイル: Wechat.php プロジェクト: Brother-Simon/yii2-wechat
 public function behaviors()
 {
     return ['timestamp' => TimestampBehavior::className(), 'array' => ['class' => ArrayBehavior::className(), 'attributes' => [ArrayBehavior::TYPE_SERIALIZE => ['access_token']]]];
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['timestamp' => ['class' => TimestampBehavior::className(), 'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['created_at']]], 'array' => ['class' => ArrayBehavior::className(), 'attributes' => [ArrayBehavior::TYPE_SERIALIZE => ['message']]]];
 }