public function save() { $new = false; if (empty($this->id)) { $new = true; } if (!empty($this->card)) { $this->card = PayCard::truncate($this->card); } parent::save(); }
public function filter($msg) { if (empty($msg['payid'])) { return $msg; } $msg['payid'] = PayCard::truncate($msg['payid']); return $msg; }