Пример #1
0
 public function AddUpdateData($dataArray = [])
 {
     if (empty($dataArray)) {
         $dataArray = $this->OutDataArray;
     }
     if ($this->GetLastError() === false) {
         for ($i = 0; $i < count($dataArray); $i++) {
             if (!empty($dataArray[$i])) {
                 parent::AddUpdateData(['digital_code' => intval($dataArray[$i]['NumCode']), 'letter_code' => $dataArray[$i]['CharCode'], 'currencyRU' => floatval($dataArray[$i]['Value']) / floatval($dataArray[$i]['Nominal']), 'currency_name_RU' => $dataArray[$i]['Name']]);
             }
         }
     } else {
         return false;
     }
 }
Пример #2
0
 public function AddUpdateData($dataArray = [])
 {
     if (empty($dataArray)) {
         $dataArray = $this->OutDataArray;
     }
     if ($this->GetLastError() === false) {
         for ($i = 0; $i < count($dataArray); $i++) {
             if (!empty($dataArray[$i])) {
                 parent::AddUpdateData(['digital_code' => intval($dataArray[$i]['digital_code']), 'letter_code' => $dataArray[$i]['letter_code'], 'currencyUA' => floatval($dataArray[$i]['exchange_rate']) / floatval($dataArray[$i]['number_of_units']), 'currency_name_UA' => $dataArray[$i]['сurrency_name']]);
             }
         }
     } else {
         return false;
     }
 }