Ejemplo n.º 1
0
 function toRow()
 {
     $arr = parent::toRow();
     // fields to encrypt
     if (isset($arr['cc_number'])) {
         $arr['cc_number'] = preg_replace('/\\D+/', '', $arr['cc_number']);
         if (empty($arr['cc']) || $arr['cc_number'] != '0000000000000000') {
             $arr['cc'] = $this->maskCc($arr['cc_number']);
         }
     }
     foreach ($this->_encryptedFields as $f) {
         if (array_key_exists($f, $arr)) {
             $arr[$f] = $this->_table->encrypt($arr[$f]);
         }
     }
     return $arr;
 }
Ejemplo n.º 2
0
 function toRow()
 {
     $arr = parent::toRow();
     if (isset($arr['echeck_ban'])) {
         $arr['echeck_ban'] = preg_replace('/\\D+/', '', $arr['echeck_ban']);
         if (empty($arr['echeck'])) {
             $arr['echeck'] = $this->maskBan($arr['echeck_ban']);
         }
     }
     $arr['echeck_aba'] = preg_replace('/\\D+/', '', $arr['echeck_aba']);
     foreach ($this->_encryptedFields as $f) {
         if (array_key_exists($f, $arr)) {
             $arr[$f] = $this->_table->encrypt($arr[$f]);
         }
     }
     return $arr;
 }
Ejemplo n.º 3
0
 /**
  * Convert currently set object variables to database record array
  * @return array
  */
 public function toRow()
 {
     return $this->getTable()->customFields()->valuesToTable(parent::toRow());
 }