当前位置: 首页>>代码示例>>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;未经允许,请勿转载。