當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Transaction::getDate方法代碼示例

本文整理匯總了PHP中Transaction::getDate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Transaction::getDate方法的具體用法?PHP Transaction::getDate怎麽用?PHP Transaction::getDate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Transaction的用法示例。


在下文中一共展示了Transaction::getDate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: createTransaction

 protected function createTransaction(\SimpleXMLElement $node, Transaction $tx, Account $account)
 {
     $nodes = ['accountFrom' => $account->getAccountNumber(), 'currency' => $tx->getCurrency(), 'amount' => number_format($tx->getAmount(), 2), 'accountTo' => $tx->getAccountNumber(), 'ks' => $tx->getConstantSymbol(), 'vs' => $tx->getVariableSymbol(), 'ss' => $tx->getSpecificSymbol(), 'bic' => $tx->getBankCode(), 'date' => $tx->getDate()->format('Y-m-d'), 'comment' => $tx->getComment(), 'benefName' => $tx->getBenefName(), 'benefStreet' => $tx->getBenefStreet(), 'benefCity' => $tx->getBenefCity(), 'benefCountry' => $tx->getBenefCountry(), 'remittanceInfo1' => $tx->getRemittanceInfo1(), 'remittanceInfo2' => $tx->getRemittanceInfo2(), 'remittanceInfo3' => $tx->getRemittanceInfo3(), 'paymentType' => $tx->getSpecification()];
     foreach ($nodes as $el => $value) {
         if (!empty($value)) {
             $node->addChild($el, $value);
         }
     }
 }
開發者ID:perlur,項目名稱:php-fio-api,代碼行數:9,代碼來源:EuroPaymentBuilder.php

示例2: createTransaction

 protected function createTransaction(\SimpleXMLElement $node, Transaction $tx, Account $account)
 {
     $nodes = ['accountFrom' => $account->getAccountNumber(), 'currency' => $tx->getCurrency(), 'amount' => number_format($tx->getAmount(), 2), 'accountTo' => $tx->getAccountNumber(), 'bankCode' => $tx->getBankCode(), 'ks' => $tx->getConstantSymbol(), 'vs' => $tx->getVariableSymbol(), 'ss' => $tx->getSpecificSymbol(), 'date' => $tx->getDate()->format('Y-m-d'), 'messageForRecipient' => $tx->getUserMessage(), 'comment' => $tx->getComment(), 'paymentType' => $tx->getSpecification()];
     foreach ($nodes as $el => $value) {
         if (!empty($value)) {
             $node->addChild($el, $value);
         }
     }
 }
開發者ID:perlur,項目名稱:php-fio-api,代碼行數:9,代碼來源:DomesticPaymentBuilder.php

示例3: safeInsertDate

 /**
  * Helper function for adding transactions to the daily balance.
  * 
  * @param Transaction $transaction
  * @param boolean $sort Flag for disabling sort on insert. Used for bulk loading.
  */
 private function safeInsertDate(Transaction $transaction, $sort = false)
 {
     $date = $transaction->getDate();
     if (!array_key_exists($date, $this->mDailyBalances)) {
         $this->mDailyBalances[$date] = 0.0;
     }
     $this->mDailyBalances[$date] += $transaction->getAmount();
     if ($sort) {
         uksort($this->mDailyBalances, array($this, "dateCompare"));
     }
 }
開發者ID:brentnem,項目名稱:benchapplication,代碼行數:17,代碼來源:transactionrecord.php


注:本文中的Transaction::getDate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。