当前位置: 首页>>代码示例>>PHP>>正文


PHP Checker::choice方法代码示例

本文整理汇总了PHP中Checker::choice方法的典型用法代码示例。如果您正苦于以下问题:PHP Checker::choice方法的具体用法?PHP Checker::choice怎么用?PHP Checker::choice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Checker的用法示例。


在下文中一共展示了Checker::choice方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processRequest

 private function processRequest($hash_out, $hash_in, $type, $choice1 = null, $choice2 = null)
 {
     $hash_config = LitleOnlineRequest::overideconfig($hash_in);
     $hash = LitleOnlineRequest::getOptionalAttributes($hash_in, $hash_out);
     Checker::choice($choice1);
     Checker::choice($choice2);
     $request = Obj2xml::toXml($hash, $hash_config, $type);
     $litleOnlineResponse = $this->newXML->request($request, $hash_config, $this->useSimpleXml);
     return $litleOnlineResponse;
 }
开发者ID:abishekrsrikaanth,项目名称:payto,代码行数:10,代码来源:LitleOnlineRequest.php

示例2: addTransaction

 private function addTransaction($hash_out, $hash_in, $type, $choice1 = null, $choice2 = null)
 {
     if ($this->closed) {
         throw new \RuntimeException("Could not add the transaction. This batchRequest is closed.");
     }
     if ($this->isFull()) {
         throw new \RuntimeException('The transaction could not be added to the batch. It is full.');
     }
     if ($type == 'accountUpdate' && $this->counts_and_amounts['accountUpdate']['count'] != $this->total_txns) {
         throw new \RuntimeException("The transaction could not be added to the batch. The transaction type {$type} cannot be mixed with non-Account Updates.");
     } elseif ($type != 'accountUpdate' && $this->counts_and_amounts['accountUpdate']['count'] == $this->total_txns && $this->total_txns > 0) {
         throw new \RuntimeException("The transaction could not be added to the batch. The transaction type {$type} cannot be mixed with AccountUpdates.");
     }
     if (isset($hash_in['reportGroup'])) {
         $report_group = $hash_in['reportGroup'];
     } else {
         $conf = Obj2xml::getConfig(array());
         $report_group = $conf['reportGroup'];
     }
     Checker::choice($choice1);
     Checker::choice($choice2);
     $request = Obj2xml::transactionToXml($hash_out, $type, $report_group);
     if (file_put_contents($this->transaction_file, $request, FILE_APPEND) === FALSE) {
         throw new \RuntimeException("A transaction could not be written to the batch file at {$this->transaction_file}. Please check your privilege.");
     }
     $this->total_txns += 1;
 }
开发者ID:abishekrsrikaanth,项目名称:payto,代码行数:27,代码来源:BatchRequest.php


注:本文中的Checker::choice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。