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


PHP Payment::populateWithArray方法代碼示例

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


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

示例1: processAddPaymentAction

 public function processAddPaymentAction()
 {
     $params = $this->_getParam('payment');
     $payment = new Payment();
     $payment->populateWithArray($params);
     if (!$payment->visitId > 0) {
         $payment->visitId = $this->_createVisit($payment->appointmentId);
     }
     $payment->timestamp = date('Y-m-d H:i:s');
     $payment->userId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
     $payment->persist();
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(true);
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:15,代碼來源:AppointmentController.php

示例2: processPaymentAction

 public function processPaymentAction()
 {
     $params = $this->_getParam('payment');
     $data = false;
     if (is_array($params)) {
         $payment = new Payment();
         $payment->populateWithArray($params);
         if (!strlen($payment->userId) > 0) {
             $payment->userId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
         }
         if (!strlen($payment->timestamp) > 0) {
             $payment->timestamp = date('Y-m-d H:i:s');
         }
         $payment->persist();
         $data = true;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:20,代碼來源:AccountsController.php

示例3: listUnallocatedFunds

 public static function listUnallocatedFunds($personId)
 {
     // payments with appointmentId OR payments assigned ONLY to person
     $db = Zend_Registry::get('dbAdapter');
     $sqlSelect = $db->select()->from('payment')->where('personId = ?', (int) $personId)->where('(amount - allocated) > 0')->where('encounter_id = 0')->where('appointmentId = 0');
     $total = 0;
     $details = array();
     if ($rows = $db->fetchAll($sqlSelect)) {
         foreach ($rows as $row) {
             $payment = new Payment();
             $payment->populateWithArray($row);
             $total += $payment->unallocated;
             $details[$row['payment_id']] = $payment;
         }
     }
     return array('total' => $total, 'details' => $details);
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:17,代碼來源:Payment.php

示例4: getCopay

 public function getCopay()
 {
     // payments with appointmentId
     $db = Zend_Registry::get('dbAdapter');
     $sqlSelect = $db->select()->from('payment')->where('personId = ?', (int) $this->patientId)->where('encounter_id = ?', (int) $this->encounter_id)->where('(amount - allocated) > 0')->where('appointmentId != 0');
     $total = 0;
     $details = array();
     $stmt = $db->query($sqlSelect);
     $stmt->setFetchMode(Zend_Db::FETCH_ASSOC);
     while ($row = $stmt->fetch()) {
         $payment = new Payment();
         $payment->populateWithArray($row);
         $total += $payment->unallocated;
         $details[$row['payment_id']] = $payment;
     }
     return array('total' => $total, 'details' => $details);
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:17,代碼來源:Visit.php

示例5: processSaveCheckAction

 public function processSaveCheckAction()
 {
     $params = $this->_getParam('payment');
     $data = false;
     if (is_array($params)) {
         $payment = new Payment();
         $payment->populateWithArray($params);
         $payment->paymentType = 'CHECK';
         $date = date('Y-m-d H:i:s');
         $payment->paymentDate = $date;
         $payment->timestamp = $date;
         $payment->persist();
         $data = true;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:18,代碼來源:ClaimsController.php


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