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


PHP Gpf_Data_RecordSet::toShalowRecordSet方法代碼示例

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


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

示例1: afterExecute

    protected function afterExecute(Gpf_Data_RecordSet $inputResult) {
        $inputResult->addColumn(Pap_Db_Table_Payouts::AMOUNT);
        $inputResult->addColumn('users');

        $payoutHistoryIds = array();
        foreach ($inputResult as $record) {
            $payoutHistoryIds[] = $record->get('id');
        }

        $outputResult = $inputResult->toShalowRecordSet();

        $payeeData = $this->getPayeeData($payoutHistoryIds);

        foreach ($inputResult as $record) {
            $payoutHistoryId = $record->get('id');
            if(!isset($payeeData[$payoutHistoryId])) {
                $record->set(Pap_Db_Table_Payouts::AMOUNT, 0);
                $record->set("users", "");
            } else {
                if (!$this->matchesSearchCriteria($record, $payeeData[$payoutHistoryId])) {
                    $this->_count--;
                    continue;
                }
                $record->set("amount", $payeeData[$payoutHistoryId]['amount']);
                $record->set("users", $payeeData[$payoutHistoryId]['usersCount'].' '.
                ($payeeData[$payoutHistoryId]['usersCount'] > 1 ? $this->_("payees") : $this->_("payee")));
            }
            $outputResult->addRecord($record);
        }
        return $outputResult;
    }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:31,代碼來源:PayoutsHistoryGrid.class.php

示例2: getBanners

 public function getBanners(Gpf_Data_RecordSet $recordSet) {
     $result = $recordSet->toShalowRecordSet();
     foreach ($recordSet as $record) {
         try {
             try {
                 Pap_Db_Table_UserInCommissionGroup::getStatus($record->get('campaignid'), Gpf_Session::getAuthUser()->getPapUserId());
             } catch (Gpf_DbEngine_NoRowException $e) {
                 if ($record->get('ctype') == Pap_Db_Campaign::CAMPAIGN_TYPE_ON_INVITATION) {
                     throw new Gpf_Exception($this->_('Private campaign'));
                 }
             }
             $result->addRecord($record);
         } catch (Gpf_Exception $e) {
         }
     }
     $recordSet->clear();
     $recordSet->loadFromObject($result->toObject());
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:18,代碼來源:Main.class.php

示例3: getCachedRecordSet

    private function getCachedRecordSet(Gpf_Data_RecordSet $recordSet) {
        $from = $this->params->get(Gpf_Ui_RichListBox::FROM);
        $rowsPerPage = $this->params->get(Gpf_Ui_RichListBox::ROWS_PER_PAGE);
        $this->count = $recordSet->getSize();
            
        if ($this->count > $this->params->get(Gpf_Ui_RichListBox::MAX_CACHED_COUNT)) {
            $cachedRecordSet = $recordSet->toShalowRecordSet();
            
            if ($from + $rowsPerPage > $this->count) {
                $to = $this->count;
            } else {
                $to = $from + $rowsPerPage;
            }

            for ($from; $from < $to; $from++) {
                $cachedRecordSet->add($recordSet->getRecord($from));
            }
            return $cachedRecordSet;
        }
        return $recordSet;
    }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:21,代碼來源:RichListBoxService.class.php


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