本文整理汇总了PHP中Gpf_Data_RecordSet::setHeader方法的典型用法代码示例。如果您正苦于以下问题:PHP Gpf_Data_RecordSet::setHeader方法的具体用法?PHP Gpf_Data_RecordSet::setHeader怎么用?PHP Gpf_Data_RecordSet::setHeader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gpf_Data_RecordSet
的用法示例。
在下文中一共展示了Gpf_Data_RecordSet::setHeader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, array $dataHeader)
{
$this->id = 0;
$this->name = $name;
$this->data = new Gpf_Data_RecordSet();
$this->data->setHeader(array_merge(array(self::WIDGET_ID), $dataHeader));
}
示例2: getSettingsNoRpc
/**
*
* @return Gpf_Data_RecordSet
*/
public function getSettingsNoRpc()
{
$this->recordSet = new Gpf_Data_RecordSet();
$this->recordSet->setHeader(new Gpf_Data_RecordHeader(array(self::CODE, self::VALUE)));
$this->loadSetting();
return $this->recordSet;
}
示例3: __construct
public function __construct() {
$this->_db = $this->createDatabase();
$this->_selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
$this->filters = new Gpf_Rpc_FilterCollection();
$this->_columns = new Gpf_View_Columns();
$this->_requiredColumns = new Gpf_Data_IndexedRecordSet('id');
$this->_requiredColumns->setHeader(array('id'));
$this->initColumns();
$this->_fileName = null;
if (!array_key_exists(self::KEY_COLUMN_ID, $this->dataColumns)) {
throw new Gpf_Exception("Key column not defined in " . get_class($this) . ". Use setKeyDataColumn() function to set key data column");
}
}
示例4: initSavedCookies
private function initSavedCookies() {
if ($this->savedCookies != null) {
return;
}
$this->savedCookies = new Gpf_Data_RecordSet();
$this->savedCookies->setHeader(array('name', 'value', 'expire', 'overwrite'));
}
示例5: 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;
}
示例6: 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;
}
示例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;
}
示例8: getColumnNames
/**
*
* @service transaction write
* @return Gpf_Data_RecordSet
*/
public function getColumnNames() {
$this->names = new Gpf_Data_RecordSet();
$this->names->setHeader(new Gpf_Data_RecordHeader(array('code', 'view')));
$this->addColumn(Pap_Db_Table_Transactions::TRANSACTION_ID, $this->_("ID"));
$this->addColumn(Pap_Db_Table_Transactions::ACCOUNT_ID, $this->_("Account ID"));
$this->addColumn(Pap_Db_Table_Transactions::USER_ID, $this->_("User ID"));
$this->addColumn(Pap_Db_Table_Transactions::BANNER_ID, $this->_("Banner ID"));
$this->addColumn(Pap_Db_Table_Transactions::PARRENT_BANNER_ID, $this->_("Parent Banner ID"));
$this->addColumn(Pap_Db_Table_Transactions::CAMPAIGN_ID, $this->_("Campaign ID"));
$this->addColumn(Pap_Db_Table_Transactions::COUNTRY_CODE, $this->_("Country Code"));
$this->addColumn(Pap_Db_Table_Transactions::PARRENT_TRANSACTION_ID, $this->_("Parent Transaction"));
$this->addColumn(Pap_Db_Table_Transactions::R_STATUS, $this->_("Status"));
$this->addColumn(Pap_Db_Table_Transactions::R_TYPE, $this->_("Type"));
$this->addColumn(Pap_Db_Table_Transactions::DATE_INSERTED, $this->_("Date inserted"));
$this->addColumn(Pap_Db_Table_Transactions::DATE_APPROVED, $this->_("Date approved"));
$this->addColumn(Pap_Db_Table_Transactions::PAYOUT_STATUS, $this->_("Payout status"));
$this->addColumn(Pap_Db_Table_Transactions::REFERER_URL, $this->_("Referrer URL"));
$this->addColumn(Pap_Db_Table_Transactions::IP, $this->_("IP"));
$this->addColumn(Pap_Db_Table_Transactions::BROWSER, $this->_("Browser"));
$this->addColumn(Pap_Db_Table_Transactions::COMMISSION, $this->_("Commission"));
$this->addColumn(Pap_Db_Table_Transactions::RECURRING_COMM_ID, $this->_("Recurring Commission ID"));
$this->addColumn(Pap_Db_Table_Transactions::CLICK_COUNT, $this->_("Click Count"));
$this->addColumn(Pap_Db_Table_Transactions::TRACK_METHOD, $this->_("Tracking Method"));
$this->addColumn(Pap_Db_Table_Transactions::ORDER_ID, $this->_("Order ID"));
$this->addColumn(Pap_Db_Table_Transactions::PRODUCT_ID, $this->_("Product ID"));
$this->addColumn(Pap_Db_Table_Transactions::TOTAL_COST, $this->_("Total cost"));
$this->addColumn(Pap_Db_Table_Transactions::FIXED_COST, $this->_("Fixed cost"));
$this->addColumn(Pap_Db_Table_Transactions::DATA1, $this->_("Extra data 1"));
$this->addColumn(Pap_Db_Table_Transactions::DATA2, $this->_("Extra data 2"));
$this->addColumn(Pap_Db_Table_Transactions::DATA3, $this->_("Extra data 3"));
$this->addColumn(Pap_Db_Table_Transactions::DATA4, $this->_("Extra data 4"));
$this->addColumn(Pap_Db_Table_Transactions::DATA5, $this->_("Extra data 5"));
$this->addColumn(Pap_Db_Table_Transactions::ORIGINAL_CURRENCY_ID, $this->_("Original currency ID"));
$this->addColumn(Pap_Db_Table_Transactions::ORIGINAL_CURRENCY_VALUE, $this->_("Original currency value"));
$this->addColumn(Pap_Db_Table_Transactions::ORIGINAL_CURRENCY_RATE, $this->_("Original currency rate"));
$this->addColumn(Pap_Db_Table_Transactions::COMMISSIONTYPEID, $this->_("Commission type ID"));
$this->addColumn(Pap_Db_Table_Transactions::MERCHANTNOTE, $this->_("Merchant note"));
$this->addColumn(Pap_Db_Table_Transactions::SYSTEMNOTE, $this->_("System note"));
$this->addColumn(Pap_Db_Table_Transactions::COUPON_ID, $this->_("Coupon ID"));
$this->addColumn(Pap_Db_Table_Transactions::VISITOR_ID, $this->_("Visitor ID"));
$this->addColumn(Pap_Db_Table_Transactions::SALE_ID, $this->_("Sale ID"));
$this->addColumn(Pap_Db_Table_Transactions::SPLIT, $this->_("Split"));
$this->addColumn(Pap_Db_Table_Transactions::LOGGROUPID, $this->_("Log group ID"));
return $this->names;
}
示例9: loadParents
/**
* Returns parent affiliates plus current affiliate
*
* @service affiliate_tree read
* @param $itemId
* @return Gpf_Data_RecordSet
*/
public function loadParents(Gpf_Rpc_Params $params) {
$result = new Gpf_Data_RecordSet();
$user = new Pap_Affiliates_User();
$result->setHeader(array_keys($user->toArray()));
$result->addColumn("subaffiliates", 1);
$this->addUserToRecordSet($result, $params->get('itemId'));
return $result;
}
示例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;
}
示例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;
}
示例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;
}
示例13: 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;
}
示例14: 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());
}
示例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'));
//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;
}