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


PHP Gpf_Data_RecordSet::add方法代码示例

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


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

示例1: getActiveView

 /**
  * @service
  * @anonym
  *
  * @param $gridcode
  */
 public function getActiveView(Gpf_Rpc_Params $params) {
     $view = new Gpf_Data_RecordSet();
     $view->setHeader(array("id"));
     try {
         $view->add(array($this->getActiveViewId($params->get('gridcode'))));
     } catch (Exception $e) {
         $view->add(array("default"));
     }
     return $view;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:16,代码来源:ViewService.class.php

示例2: loadSubfilesFiles

 private function loadSubfilesFiles($fileUrl, Gpf_Data_RecordSet $result, $directories = false)
 {
     foreach (new Gpf_Io_DirectoryIterator($fileUrl, '', false, $directories) as $fullFileName => $file) {
         $file = new Gpf_Io_File($fullFileName);
         if ($file->isDirectory()) {
             $filesData = $this->getFilesData($fullFileName);
             $result->add(array($fullFileName, $filesData['count'], $file->getName(), $filesData['size'], self::TYPE_DIRECTORY));
             continue;
         }
         $result->add(array($fullFileName, 0, $file->getName(), $file->getSize(), self::TYPE_FILE));
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:12,代码来源:FilesTree.class.php

示例3: serializeToRecordset

 private function serializeToRecordset(Gpf_Data_RecordSet $response, $level)
 {
     foreach ($this->items as $menuItem) {
         $response->add(array($menuItem->getCode(), "" . $level, $menuItem->getTitle()));
         $menuItem->serializeToRecordset($response, $level + 1);
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:MenuItem.class.php

示例4: save

 /**
  * @service mail_template write
  * @param $fields
  * @return Gpf_Rpc_Form
  */
 public function save(Gpf_Rpc_Params $params)
 {
     $form = new Gpf_Rpc_Form($params);
     try {
         $mailTemplate = $this->loadMailTemplate($form->getFieldValue('templateid'));
     } catch (Gpf_Exception $e) {
         $form->setErrorMessage($this->_('Failed to load mail template with error: %s', $e->getMessage()));
         return $form;
     }
     try {
         $className = $mailTemplate->get(Gpf_Db_Table_MailTemplates::CLASS_NAME);
         $objTemplate = new $className();
         $templateVariables = new Gpf_Data_RecordSet();
         $templateVariables->setHeader(array('id', 'value'));
         foreach ($objTemplate->getTemplateVariables() as $code => $name) {
             $record = $templateVariables->createRecord();
             $record->set('id', $code);
             $record->set('value', $form->getFieldValue('var_' . $code));
             $templateVariables->add($record);
         }
         $objTemplate->setCachedVariableValues($templateVariables);
         $objTemplate->addRecipient($form->getFieldValue('recipient'));
         $objTemplate->sendNow();
     } catch (Gpf_Exception $e) {
         $form->setErrorMessage($this->_('Failed to send test mail with error: %s', $e->getMessage()));
         return $form;
     }
     $form->setInfoMessage($this->_('Test mail was successfully queued'));
     return $form;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:35,代码来源:MailTemplateTestForm.class.php

示例5: decode

 /**
  * @param array $requestArray
  * @return StdClass
  */
 function decode($requestArray)
 {
     $param = new stdClass();
     $reservedParams = array(Gpf_Rpc_Params::CLASS_NAME, Gpf_Rpc_Params::METHOD_NAME, Gpf_Rpc_Params::SESSION_ID, Gpf_Rpc_Server::FORM_REQUEST, Gpf_Rpc_Server::FORM_RESPONSE);
     $recordset = new Gpf_Data_RecordSet();
     $recordset->setHeader(array("name", "value"));
     foreach ($requestArray as $name => $value) {
         if (in_array($name, $reservedParams)) {
             continue;
         }
         if (get_magic_quotes_gpc()) {
             $value = stripslashes($value);
         }
         $record = $recordset->createRecord();
         $record->set("name", $name);
         $record->set("value", $value);
         $recordset->add($record);
     }
     $param->fields = $recordset->toObject();
     foreach ($reservedParams as $paramName) {
         if (array_key_exists($paramName, $requestArray)) {
             $param->{$paramName} = $requestArray[$paramName];
         }
     }
     return $param;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:30,代码来源:FormHandler.class.php

示例6: addRequiredColumn

 protected function addRequiredColumn($columnName) {
    try {
         $this->_requiredColumns->getRecord($columnName);            
     } catch (Gpf_Data_RecordSetNoRowException $e) {
         $this->_requiredColumns->add(array($columnName, Gpf::YES));    
     }        
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:GridService.class.php

示例7: getActionTypes

    /**
     * @service campaign read
     * @return Gpf_Data_RecordSet
     */
    public function getActionTypes(Gpf_Rpc_Params $params) {
        $actionTypesHeader = array(Pap_Db_Table_CommissionTypes::TYPE, Pap_Db_Table_CommissionTypes::NAME, Pap_Db_Table_CommissionTypes::ID, 'campaignName');

        $data = new Gpf_Rpc_Data($params);
        $filters = $data->getFilters();

        $statsParams = new Pap_Stats_Params();
        $statsParams->setCampaignId($filters->getFilterValue('campaignid'));
        $statsParams->setBannerId($filters->getFilterValue('bannerid'));

        $transactionTypeStats = new Pap_Stats_TransactionTypeStats($statsParams);
        $transactionTypes = $transactionTypeStats->getTypes();

        $actionTypesRecordSet = new Gpf_Data_RecordSet();
        $actionTypesRecordSet->setHeader($actionTypesHeader);

        $this->initActionCampaignNames();

        foreach ($transactionTypes as $transactionType) {
            if ($transactionType->getType() != Pap_Common_Constants::TYPE_SALE && $transactionType->getType() !=Pap_Common_Constants::TYPE_ACTION && $transactionType->getType() != Pap_Common_Constants::TYPE_RECURRING) {
                continue;
            }
            $actionTypesRecordSet->add(new Gpf_Data_Record($actionTypesHeader, array($transactionType->getType(), $transactionType->getName(), $transactionType->getCommissionTypeId(), $this->getActionCampaignName($transactionType->getCommissionTypeId()))));
        }
        return $actionTypesRecordSet;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:30,代码来源:TransactionTypes.class.php

示例8: loadCouponConstants

 /**
  * @service coupon read
  * @param $params
  * @return Gpf_Data_RecordSet
  */
 public function loadCouponConstants(Gpf_Rpc_Params $params) {
     $couponConstants = new Gpf_Data_RecordSet();
     $couponConstants->setHeader(array('id', 'name'));
     foreach ($this->getCouponBannersSelect()->getAllRowsIterator() as $couponBannerData) {
         if ($params->get('bannertype') == Pap_Common_Banner_Factory::BannerTypeHtml || $params->get('bannertype') == Pap_Common_Banner_Factory::BannerTypePromoEmail) {
             $couponConstant = $couponConstants->createRecord();
             $couponConstant->set('id', 'coupon_' . $couponBannerData->get('id'));
             $couponConstant->set('name', $this->_($couponBannerData->get('name')));
             $couponConstants->add($couponConstant);
         }
         $couponConstant = $couponConstants->createRecord();
         $couponConstant->set('id', 'couponcode_' . $couponBannerData->get('id'));
         $couponConstant->set('name', $this->_($couponBannerData->get('name')) . ' ' . $this->_('(only coupon code)'));
         $couponConstants->add($couponConstant);
     }
     return $couponConstants;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:22,代码来源:Constants.class.php

示例9: afterExecute

	protected function afterExecute(Gpf_Data_RecordSet $inputResult) {
		$outPutResult = new Gpf_Data_RecordSet();
		$outPutResult->setHeader(array(parent::KEY_COLUMN_ID, 'number', 'rule'));

		foreach ($inputResult as $row) {
		    $rule = new Pap_Features_PerformanceRewards_Rule_Transaction();
		    $rule->fillFromRecord($row);
		    $rule->setCommissionGroupId($row->get('commissiongroup'));
		    try {
			     $outPutResult->add(array($row->get(parent::KEY_COLUMN_ID), $row->get('number'), $rule->getString()));
		    } catch (Pap_Features_PerformanceRewards_UnknownRuleException $e) {
		         $outPutResult->add(array($row->get(parent::KEY_COLUMN_ID), $row->get('number'), $this->_('Unknown rule (%s) - probably created with some feature or plugin - this rule will not be applied.', $rule->getAction())));
		    }
		}
	    
		return $outPutResult;
	}
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:17,代码来源:RulesGrid.class.php

示例10: getAvailableLanguages

 /**
  *
  * @return Gpf_Data_RecordSet
  */
 private function getAvailableLanguages()
 {
     $languages = new Gpf_Data_RecordSet();
     $languages->setHeader(array('id', 'name'));
     foreach (new Gpf_Lang_InstallLanguages() as $language) {
         $languages->add(array($language->getCode(), $language->getExtendedName()));
     }
     return $languages;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:13,代码来源:SelectLanguage.class.php

示例11: loadWrapperNames

 /**
  * @service banner_format_setting read
  * @return Gpf_Data_RecordSet
  */
 public function loadWrapperNames(Gpf_Rpc_Params $params) {
     $row = new Pap_Db_BannerWrapper();
     $collection = $row->loadCollection();
     $result = new Gpf_Data_RecordSet();
     $result->setHeader(array('id', 'name'));
     foreach ($collection as $row){
         $result->add(array($row->getId(), $row->getName()));
     }
     return $result;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:14,代码来源:BannerWrapperService.class.php

示例12: loadDataTypes

 /**
  * returns data for chart
  *
  * @service trend_stats read
  * @param $fields
  * @return Gpf_Rpc_Chart
  */
 public function loadDataTypes(Gpf_Rpc_Params $params) {
     $this->initCampaignId($params);
     $this->initDataTypes();
     $recordSet = new Gpf_Data_RecordSet();
     $recordSet->setHeader(array("id", "value"));
     foreach ($this->dataTypes as $dataType) {
         $recordSet->add(array($dataType->getId(), $dataType->getName()));
     }
     return $recordSet;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:17,代码来源:StatisticsBase.class.php

示例13: fillFromUser

 private function fillFromUser(Gpf_Rpc_Form $form, Pap_Affiliates_User $user) {
     $userData = new Gpf_Data_RecordSet();
     $userData->setHeader(array('userid', 'username','firstname', 'lastname'));
     $data = $userData->createRecord();
     $data->add('userid', $user->getId());
     $data->add('username', $user->getUserName());
     $data->add('firstname', $user->getFirstName());
     $data->add('lastname', $user->getLastName());
     $userData->add($data);
     $form->setField('userid', null, $userData->toObject());
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:11,代码来源:OfflineSaleForm.class.php

示例14: getTemplateVariables

 /**
  * Load list of template variables for custom template
  *
  * @service mail_template read
  * @param Gpf_Rpc_Params $params
  */
 public function getTemplateVariables(Gpf_Rpc_Params $params)
 {
     $recordSet = new Gpf_Data_RecordSet();
     $recordSet->setHeader(array('code', 'name'));
     //TODO - treba prerobit cez extension point ... v pap newsletter feature budu premenne definovane cez Pap_Mail_UserMail
     $objTemplate = new Pap_Mail_UserMail();
     foreach ($objTemplate->getTemplateVariables() as $code => $name) {
         $recordSet->add(array($code, $name));
     }
     return $recordSet;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:17,代码来源:SendBroadcastMail.class.php

示例15: getTemplateVariables

    /**
     * Load list of template variables for custom template
     *
     * @service mail_template read
     * @param Gpf_Rpc_Params $params
     */
    public function getTemplateVariables(Gpf_Rpc_Params $params) {
        $recordSet = new Gpf_Data_RecordSet();
        $recordSet->setHeader(array('code', 'name'));

        $objTemplate = new Pap_Mail_UserMail();

        foreach ($objTemplate->getTemplateVariables() as $code => $name) {
            $recordSet->add(array($code, $name));
        }

        return $recordSet;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:18,代码来源:SendMassMail.class.php


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