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


PHP dbeav_model::save方法代碼示例

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


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

示例1: save

 function save(&$sdf, $mustUpdate = null)
 {
     if (isset($sdf['member_id']) && !isset($sdf['pam_account']['account_id'])) {
         $sdf['pam_account']['account_id'] = $sdf['member_id'];
     }
     if (isset($sdf['profile']['gender'])) {
         if ($sdf['profile']['gender'] == 'male') {
             $sdf['profile']['gender'] = 1;
         } elseif ($sdf['profile']['gender'] == 'female') {
             $sdf['profile']['gender'] = 0;
         } else {
             unset($sdf['profile']['gender']);
         }
     }
     if (isset($sdf['profile']['birthday'])) {
         $data = explode('-', $sdf['profile']['birthday']);
         $sdf['b_year'] = intval($data[0]);
         $sdf['b_month'] = intval($data[1]);
         $sdf['b_day'] = intval($data[2]);
         unset($sdf['profile']['birthday']);
     }
     $sdf['contact']['addr'] = htmlspecialchars($sdf['contact']['addr']);
     parent::save($sdf);
     return true;
 }
開發者ID:dalinhuang,項目名稱:shopexts,代碼行數:25,代碼來源:members.php

示例2: save

 public function save(&$data, $mustUpdate = null, $mustInsert = false)
 {
     if ($data['area_fee_conf'] && is_array($data['area_fee_conf'])) {
     }
     $return = parent::save($data, $mustUpdate);
     return $return;
 }
開發者ID:yindonghai,項目名稱:msk.com,代碼行數:7,代碼來源:dlytype.php

示例3: save

 /**
  * 模板統一保存的方法
  * @params array - 需要保存的支付信息
  * @params boolean - 是否需要強製保存
  * @return boolean - 保存的成功與否的進程
  */
 public function save(&$data, $mustUpdate = null, $mustInsert = false)
 {
     // 異常處理
     if (!isset($data) || !$data || !is_array($data)) {
         trigger_error(app::get('ectools')->_("支付單信息不能為空!"), E_USER_ERROR);
         exit;
     }
     $sdf = array();
     // 支付數據列表
     $background = true;
     //後台 todo
     $payment_data = $data;
     $sdf_payment = parent::dump($data['payment_id'], '*', 'default');
     if ($sdf_payment) {
         if ($data['orders'][0]['rel_id'] && key($sdf_payment['orders']) != $data['orders'][0]['rel_id']) {
             return false;
         }
         if ($sdf_payment['status'] == $data['status'] || $sdf_payment['status'] != 'progress' && $sdf_payment['status'] != 'ready') {
             return true;
         }
         if ($data['currency'] && $sdf_payment['currency'] != $data['currency']) {
             return false;
         }
     }
     $sdf = $data;
     $sdf['status'] = $sdf['status'] ? $sdf['status'] : 'ready';
     // 保存支付信息(可能是退款信息)
     $is_succ = parent::save($sdf, $mustUpdate, $mustInsert);
     return $is_succ;
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:36,代碼來源:payments.php

示例4: save

 function save(&$sdf, $mustUpdate = null)
 {
     if (isset($sdf['member_id']) && !isset($sdf['pam_account']['account_id'])) {
         $sdf['pam_account']['account_id'] = $sdf['member_id'];
     }
     if (isset($sdf['profile']['gender'])) {
         if ($sdf['profile']['gender'] == 'male') {
             $sdf['profile']['gender'] = 1;
         } elseif ($sdf['profile']['gender'] == 'female') {
             $sdf['profile']['gender'] = 0;
         } else {
             unset($sdf['profile']['gender']);
         }
     }
     if (isset($sdf['profile']['birthday']) && $sdf['profile']['birthday']) {
         $data = explode('-', $sdf['profile']['birthday']);
         $sdf['b_year'] = intval($data[0]);
         $sdf['b_month'] = intval($data[1]);
         $sdf['b_day'] = intval($data[2]);
         unset($sdf['profile']['birthday']);
     }
     $sdf['contact']['addr'] = htmlspecialchars($sdf['contact']['addr']);
     $info_object = kernel::service('sensitive_information');
     if (is_object($info_object)) {
         $info_object->opinfo($sdf, 'b2c_mdl_members', __FUNCTION__);
     }
     parent::save($sdf);
     #$this->save_member_info_kv($sdf['member_id']);
     return true;
 }
開發者ID:syjzwjj,項目名稱:quyeba,代碼行數:30,代碼來源:members.php

示例5: save

 /**
  * 模板統一保存的方法
  * @params array - 需要保存的支付信息
  * @params boolean - 是否需要強製保存
  * @return boolean - 保存的成功與否的進程
  */
 public function save(&$data, $mustUpdate = NULL, $mustInsert = false)
 {
     // 異常處理
     if (!isset($data) || !$data || !is_array($data)) {
         trigger_error(app::get('ectools')->_("支付單信息不能為空!"), E_USER_ERROR);
         exit;
     }
     $sdf = array();
     // 支付數據列表
     $background = true;
     //後台 todo
     $payment_data = $data;
     $sdf_payment = parent::dump($data['refund_id'], '*');
     if ($sdf_payment) {
         if ($sdf_payment['status'] == $data['status'] || $sdf_payment['status'] != 'progress' && $sdf_payment['status'] != 'ready') {
             return true;
         }
         if ($data['currency'] && $sdf_payment['currency'] != $data['currency']) {
             return false;
         }
     }
     if ($sdf_payment) {
         $sdf = array_merge($sdf_payment, $data);
     } else {
         $sdf = $data;
         //$sdf['status'] = 'ready';
     }
     // 保存支付信息(可能是退款信息)
     $is_succ = parent::save($sdf);
     return $is_succ;
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:37,代碼來源:refunds.php

示例6: save

 public function save(&$data, $mustUpdate = null, $mustInsert = false)
 {
     if ($data['content']) {
         $data['content'] = base64_encode($data['content']);
     }
     return parent::save($data, $mustUpdate);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:7,代碼來源:file.php

示例7: save

 function save(&$data, $mustUpdate = null)
 {
     if ($data['area']) {
         $data['area'] = $data['area']['area_type'] . ':' . implode('/', $data['area']['sar']) . ':' . $data['area']['id'];
     }
     return parent::save($data, $mustUpdate);
 }
開發者ID:dalinhuang,項目名稱:shopexts,代碼行數:7,代碼來源:addrs.php

示例8: save

 /**
  * 保存的方法
  * @param mixed 保存的數據內容
  * @return boolean
  */
 public function save(&$aData, $mustUpdate = null, $mustInsert = false)
 {
     $path = array();
     $parent_id = $aData['parent_id'];
     while ($parent_id) {
         if ($aData['cat_id'] && $aData['cat_id'] == $parent_id) {
             return false;
             break;
         }
         array_unshift($path, $parent_id);
         $row = $this->dump(array('cat_id' => $parent_id), 'parent_id, cat_path, p_order');
         $parent_id = $row['parent_id'];
     }
     $olddata = $this->getList('*', array('cat_id' => $aData['cat_id']));
     if ($olddata[0]['parent_id'] && $olddata[0]['parent_id'] != $aData['parent_id']) {
         $row = $this->getList('*', array('cat_id' => $olddata[0]['parent_id']));
         $oldSave['cat_id'] = $row[0]['cat_id'];
         $oldSave['child_count'] = $row[0]['child_count'] - 1;
         parent::save($oldSave);
     }
     $aData['cat_path'] = $this->getCatPath($aData['parent_id']);
     if ($aData['parent_id'] != 0) {
         $row = parent::dump($aData['parent_id']);
         $data['child_count'] = $row['child_count'] + 1;
         $data['cat_id'] = $aData['parent_id'];
         parent::save($data);
     }
     parent::save($aData);
     return $this->cat2json();
 }
開發者ID:noikiy,項目名稱:snk,代碼行數:35,代碼來源:cat.php

示例9: save

 function save(&$sdf, $mustUpdate = null)
 {
     if (!isset($sdf['orders'])) {
         $sdf['orders'] = array(array('order_id' => $sdf['order_id'], 'items' => $sdf['items']));
     }
     $tmpvar = $sdf['orders'];
     foreach ($tmpvar as $k => $row) {
         $sdf['orders'][$k]['dlytype'] = 'reship';
         $sdf['orders'][$k]['dly_id'] = $sdf['reship_id'];
     }
     unset($tmpvar);
     if (parent::save($sdf)) {
         //一張發貨單多個訂單
         $oOrder =& $this->app->model('orders');
         foreach ($sdf['orders'] as $order) {
             if ($sdf['order_id']) {
                 $sdf_order = $oOrder->dump($order['order_id']);
                 if ($sdf_order['ship_status'] == 5) {
                     continue;
                 }
                 //todo 訂單是否完全發貨
                 $data['ship_status'] = 4;
                 $data['order_id'] = $sdf['order_id'];
                 $filter['order_id'] = $sdf['order_id'];
                 $orders =& $this->app->model('orders');
                 $orders->update($data, $filter);
             }
         }
     }
     return true;
 }
開發者ID:syjzwjj,項目名稱:quyeba,代碼行數:31,代碼來源:reship.php

示例10: save

 function save(&$sdf, $mustUpdate = null, $mustInsert = false)
 {
     if (!isset($sdf['orders'])) {
         $sdf['orders'] = array(array('order_id' => $sdf['order_id'], 'items' => $sdf['delivery_items']));
     }
     $tmpvar = $sdf['orders'];
     foreach ($tmpvar as $k => $row) {
         $sdf['orders'][$k]['dlytype'] = 'delivery';
         $sdf['orders'][$k]['dly_id'] = $sdf['delivery_id'];
     }
     unset($tmpvar);
     if (parent::save($sdf)) {
         //一張發貨單多個訂單
         /*$oOrder = $this->app->model('orders');
           foreach($sdf['orders'] as $order){
               if($sdf['order_id']){
                   $sdf_order = $oOrder->dump($order['order_id'],'*',array('order_items'=>'*'));
                   if($sdf_order['ship_status'] == 1){
                       continue;
                   }
                   //todo 訂單是否完全退貨 
                   $data['ship_status'] = 1;
                   
                   $data['order_id'] = $sdf['order_id'];
                   $filter['order_id'] = $sdf['order_id'];
                   $orders = $this->app->model('orders');
                   $orders->update($data, $filter);
               }
           }*/
         return true;
     }
     return false;
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:33,代碼來源:delivery.php

示例11: save

 function save(&$data, $mustUpdate = null, $mustInsert = false)
 {
     if ($data['custom'] == 'false') {
         return true;
     }
     parent::save($data, $mustUpdate);
 }
開發者ID:sss201413,項目名稱:ecstore,代碼行數:7,代碼來源:price.php

示例12: save

 public function save(&$sdf, $mustUpdate = null, $mustInsert = false)
 {
     if (isset($sdf['profile']['gender'])) {
         if ($sdf['profile']['gender'] === 'male') {
             $sdf['profile']['gender'] = 1;
         } elseif ($sdf['profile']['gender'] === 'female') {
             $sdf['profile']['gender'] = 0;
         } else {
             unset($sdf['profile']['gender']);
         }
     }
     if (isset($sdf['profile']['birthday']) && $sdf['profile']['birthday']) {
         $data = explode('-', $sdf['profile']['birthday']);
         $sdf['b_year'] = intval($data[0]);
         $sdf['b_month'] = intval($data[1]);
         $sdf['b_day'] = intval($data[2]);
         unset($sdf['profile']['birthday']);
     }
     $sdf['contact']['addr'] = htmlspecialchars($sdf['contact']['addr']);
     if (empty($sdf['member_lv']) || empty($sdf['member_lv']['member_group_id'])) {
         $sdf['member_lv']['member_group_id'] = $this->app->model('member_lv')->get_default_lv();
     }
     $info_object = vmc::service('sensitive_information');
     if (is_object($info_object)) {
         $info_object->opinfo($sdf, 'b2c_mdl_members', __FUNCTION__);
     }
     $flag = parent::save($sdf, $mustUpdate, $mustInsert);
     return $flag;
 }
開發者ID:yindonghai,項目名稱:msk.com,代碼行數:29,代碼來源:members.php

示例13: save

 public function save(&$sdf, $mustUpdate = null, $mustInsert = false)
 {
     if (!$sdf['comment_id']) {
         $sdf['comment_id'] = $this->apply_id($sdf['comment_type'] ? $sdf['comment_type'] : 'comment');
     }
     $is_save = parent::save($sdf, $mustUpdate, $mustInsert);
     return $is_save;
 }
開發者ID:noikiy,項目名稱:msk.com,代碼行數:8,代碼來源:comment.php

示例14: save

 function save(&$item)
 {
     $list = parent::getList('*', array('tag_name' => $item['tag_name'], 'tag_type' => $item['tag_type'], 'app_id' => $item['app_id']));
     if ($list && count($list) > 0) {
         $item['tag_id'] = $list[0]['tag_id'];
     }
     parent::save($item);
 }
開發者ID:dalinhuang,項目名稱:shopexts,代碼行數:8,代碼來源:tag.php

示例15: save

 /**
  * 重載訂單標準數據
  * @params array - standard data format
  * @params boolean 是否必須強製保存
  */
 public function save(&$sdf, $mustUpdate = null, $mustInsert = false)
 {
     $info_object = vmc::service('sensitive_information');
     if (is_object($info_object)) {
         $info_object->opinfo($sdf, 'b2c_mdl_orders', __FUNCTION__);
     }
     $is_save = parent::save($sdf, $mustUpdate, $mustInsert);
     return $is_save;
 }
開發者ID:noikiy,項目名稱:msk.com,代碼行數:14,代碼來源:orders.php


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