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


PHP Payment::persist方法代码示例

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


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

示例1: 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

示例2: 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

示例3: processDeleteUnallocatedFundsAction

 public function processDeleteUnallocatedFundsAction()
 {
     $paymentId = (int) $this->_getParam('paymentId');
     $payment = new Payment();
     $payment->paymentId = $paymentId;
     $payment->populate();
     // double check if paymentId is really an unallocated fund
     $result = false;
     if ($payment->allocated == 0 && $payment->visitId == 0 && $payment->appointmentId == 0) {
         $payment->setPersistMode(WebVista_Model_ORM::DELETE);
         $payment->persist();
         $funds = Payment::listUnallocatedFunds($payment->personId);
         $unallocatedFunds = (double) $funds['total'];
         if ($unallocatedFunds < 0) {
             $unallocatedFunds = 0;
         }
         $result = sprintf('%.2f', $unallocatedFunds);
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($result);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:22,代码来源:ClaimsController.php


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