public function loadFromObject(stdClass $object) { $this->rows = new Gpf_Data_RecordSet(); $this->rows->loadFromObject($object->rows); $this->count = $object->count; $this->from = $object->from; $this->to = $object->to; }
/** * * @return Gpf_DbEngine_Row_Collection */ public function getAffectedAffiliatesList($filters = null) { if (is_null($filters)) { $filters = array(); $filter = new Gpf_Data_Filter("reachedCondition", "E", Gpf::NO); $filters[] = $filter->toObject(); } $params = new Gpf_Rpc_Params(); $params->add('filters', $filters); $params->add('columns', array(array('id'),array('id'))); $params->add('limit', 100000); $grid = new Pap_Features_CompressedCommissionPlacementModel_PlacementOverviewGrid(); $response = $grid->getRows($params); $recordSet = new Gpf_Data_RecordSet(); $recordSet->loadFromObject($response->rows); $user = new Pap_Db_User(); return $user->loadCollectionFromRecordset($recordSet); }
/** * @return Gpf_Data_RecordSet */ public function getRecordSet() { $response = new Gpf_Data_RecordSet(); $response->loadFromObject($this->getStdResponse()); return $response; }
public function loadFromObject(stdClass $object) { $this->recordset = new Gpf_Data_RecordSet(); $this->recordset->loadFromObject($object->rows); $this->totalCount = $object->count; }
/** * Proxy request from server to Addons web server and return list of Integration steps * @service integration_methods read * @param Gpf_Rpc_Params $params * @return Gpf_Data_RecordSet */ public function getIntegrationStepsList(Gpf_Rpc_Params $params) { $proxyRequest = new Gpf_Rpc_Request('Aw_Db_Table_IntegrationSteps', 'getIntegrationStepsList'); $this->sendRequest($proxyRequest, $params); $recordSet = new Gpf_Data_RecordSet(); $recordSet->loadFromObject($proxyRequest->getResponseObject()->toObject()); $this->processIntegrationSteps($recordSet); return $recordSet; }
/** * * @service transaction write * @return Gpf_Rpc_Action */ public function makeRefundChargebackByParams(Gpf_Rpc_Params $params) { $transactionsGrid = new Pap_Merchants_Transaction_TransactionsGrid(); $ransactionsResponse = $transactionsGrid->getRows($params); $transactionsRecordSet = new Gpf_Data_RecordSet(); $transactionsRecordSet->loadFromObject($ransactionsResponse->rows); $ids = Array(); foreach ($transactionsRecordSet as $transactionRrecord) { $ids[] = $transactionRrecord->get(Pap_Db_Table_Transactions::TRANSACTION_ID); } $refundParams = new Gpf_Rpc_Params(); $refundParams->add(Gpf_Rpc_Action::IDS, $ids); $refundParams->add(self::REFUND_MERCHANT_NOTE, $params->get(self::REFUND_MERCHANT_NOTE)); $refundParams->add(self::REFUND_TYPE, $params->get(self::REFUND_TYPE)); $refundParams->add(self::REFUND_FEE, $params->get(self::REFUND_FEE)); return $this->makeRefundChargeback($refundParams); }
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()); }