• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Gpf_Plugins_Engine类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getUserById

    /**
     * gets user by user id
     * @param $userId
     * @return Pap_Affiliates_User
     */
    public function getUserById($context, $id) {
        if($id == '') {
            return null;
        }

        if (isset($this->usersCache[$id])) {
            return $this->usersCache[$id];
        }

        try {
            $this->usersCache[$id] = $this->loadUserFromId($id);
            return $this->usersCache[$id];
        } catch (Gpf_Exception $e) {

            $context->debug("User with RefId/UserId: $id doesn't exist");

            $valueContext = new Gpf_Plugins_ValueContext(null);
            $valueContext->setArray(array($id, $context));

            Gpf_Plugins_Engine::extensionPoint('Tracker.RecognizeAffiliate.getUserById', $valueContext);

            $user = $valueContext->get();

            if (!is_null($user)) {
                $this->usersCache[$id] = $user;
                return $this->usersCache[$id];
            }

            return null;
        }
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:36,代码来源:RecognizeAffiliate.class.php


示例2: getCommissionGroup

	/**
	 * returns commission group for user (if not set already)
	 * Commission group can be set previously in the checkCampaignType() function
	 *
	 */
	protected function getCommissionGroup(Pap_Contexts_Tracking $context) {
		$context->debug('Recognizing commission group started');

		if (($user = $context->getUserObject()) == null) {
		    $context->debug('STOPPING, user is not set - cannot find commission group');
		    return;
		}
		
		$commGroupId = $this->getUserCommissionGroupFromCache($context->getCampaignObject(), $user->getId());
		if($commGroupId == false) {
			$context->debug("STOPPING, Cannot find commission group for this affiliate and campaign! ".$context->getCampaignObject()->getId().' - '.$user->getId());
			$context->setDoCommissionsSave(false);
			$context->setDoTrackerSave(false);
			return;
		}
			
		Gpf_Plugins_Engine::extensionPoint('PostAffiliate.RecognizeCommGroup.getCommissionGroup', $context);

        $commissionGroup = $this->getCommissionGroupFromCache($commGroupId);
        if ($commissionGroup == null) {
        	$context->debug('    Commission group with ID '.$commGroupId . ' does not exist');
        	return;
        }

		$context->setCommissionGroup($commissionGroup);
	    $context->debug('Received commission group ID = '.$commGroupId);
	}
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:32,代码来源:RecognizeCommGroup.class.php


示例3: initConstraints

 protected function initConstraints()
 {
     $this->addCascadeDeleteConstraint(self::ID, Gpf_Db_Table_PasswordRequests::AUTHUSERID, new Gpf_Db_PasswordRequest());
     Gpf_Plugins_Engine::extensionPoint('AuthUsers.initConstraints', $this);
     $this->addConstraint(new Gpf_DbEngine_Row_PasswordConstraint(self::PASSWORD));
     $this->addConstraint(new Gpf_DbEngine_Row_UniqueConstraint(array(self::USERNAME)));
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:AuthUsers.class.php


示例4: initTransTypes

 private function initTransTypes() {
     $this->addTransType(Pap_Common_Constants::TYPE_CLICK);
     $this->addTransType(Pap_Common_Constants::TYPE_SALE);
     $this->addTransType(Pap_Common_Constants::TYPE_REFUND);
     $this->addTransType(Pap_Common_Constants::TYPE_CHARGEBACK);
     Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Stats.initTransactionTypes', $this);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:TransactionTypeStats.class.php


示例5: show

 public function show(Pap_Db_CachedBanner $cachedBanner) {
     try {
         $request = new Pap_Tracking_Request();
         $banner = $this->getBanner($cachedBanner->getBannerId(), $cachedBanner->getUserId(), $cachedBanner->getChannel());
         $req = new Pap_Tracking_BannerViewerRequest($banner->getBannerType());
         Gpf_Plugins_Engine::extensionPoint(self::EXT_POINT_NAME, $req);
         if($req->getViewer() != null) {
             $req->getViewer()->showBanner($request , $banner);
             return;
         }
         $this->prepareCachedBanner($banner, $cachedBanner);
         try {
             $cachedBanner->save();
         } catch (Gpf_DbEngine_Row_ConstraintException $e) {
             // cached banner was saved already by other script
         }
         if ($cachedBanner->getHeaders() != '') {
             header($cachedBanner->getHeaders(), true);
         }
         echo $cachedBanner->getCode();
     } catch (Exception $e) {
         $this->logMessage($e);
         echo $e;
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:25,代码来源:BannerViewer.class.php


示例6: load

 /**
  * @anonym
  * @service
  * @param $fields
  */
 public function load(Gpf_Rpc_Params $params) {
     $form = new Gpf_Rpc_Form($params);
     
     Gpf_Plugins_Engine::extensionPoint('PostAffiliate.CommissionTypeEditAdditionalForm.load', $form);
     
     return $form;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:12,代码来源:CommissionTypeEditAdditionalForm.class.php


示例7: loadFullStatistics

	/**
	 *
	 * @service banner_stats read
	 * @param $data
	 */
	public function loadFullStatistics(Gpf_Rpc_Params $params) {
		$data = new Gpf_Rpc_Data($params);

		$select = new Gpf_SqlBuilder_SelectBuilder();
		$select->from->add(Pap_Db_Table_Banners::getName());
		$select->select->add("COUNT(".Pap_Db_Table_Banners::ID.")", "count");
		$select->select->add(Pap_Db_Table_Banners::TYPE, 'type');
		$select->groupBy->add(Pap_Db_Table_Banners::TYPE);
		
		Gpf_Plugins_Engine::extensionPoint('AffiliateNetwork.modifyWhere', 
        new Gpf_Common_SelectBuilderCompoundRecord($select, new Gpf_Data_Record(array(), array())));
		
        $result = $select->getAllRowsIndexedBy('type');
		$bannerTypes = explode(',', $data->getParam('bannerTypes'));		
		
		$bannersCount = 0;
		foreach ($bannerTypes as $bannerType) {
			$bannerTypeCount = 0;
			try {
				$bannerTypeCount = $result->getRecord($bannerType)->get('count');
			} catch (Gpf_Data_RecordSetNoRowException $e) {				
			}
			$data->setValue($bannerType, "$bannerTypeCount");
			$bannersCount += $bannerTypeCount;
		}
		$data->setValue("bannersCount", "$bannersCount");		

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


示例8: getInstance

 /**
  * returns instance of plugins Engine class
  *
  * @return Gpf_Plugins_Engine
  */
 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new Gpf_Plugins_Engine();
     }
     return self::$instance;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:12,代码来源:Engine.class.php


示例9: save

    /**
     * @service fraud_protection write
     * @param $fields
     */
    public function save(Gpf_Rpc_Params $params) {
        $form = new Gpf_Rpc_Form($params);

        Gpf_Settings::set(Pap_Settings::BANNEDIPS_LIST_SIGNUPS,
        $form->getFieldValue(Pap_Settings::BANNEDIPS_LIST_SIGNUPS));

        Gpf_Settings::set(Pap_Settings::BANNEDIPS_SIGNUPS,
        $form->getFieldValue(Pap_Settings::BANNEDIPS_SIGNUPS));

        Gpf_Settings::set(Pap_Settings::BANNEDIPS_SIGNUPS_ACTION,
        $form->getFieldValue(Pap_Settings::BANNEDIPS_SIGNUPS_ACTION));

        Gpf_Settings::set(Pap_Settings::REPEATING_SIGNUPS_SETTING_NAME,
        $form->getFieldValue(Pap_Settings::REPEATING_SIGNUPS_SETTING_NAME));

        Gpf_Settings::set(Pap_Settings::REPEATING_SIGNUPS_SECONDS_SETTING_NAME,
        $form->getFieldValue(Pap_Settings::REPEATING_SIGNUPS_SECONDS_SETTING_NAME));

        Gpf_Settings::set(Pap_Settings::REPEATING_SIGNUPS_ACTION_SETTING_NAME,
        $form->getFieldValue(Pap_Settings::REPEATING_SIGNUPS_ACTION_SETTING_NAME));

        Gpf_Plugins_Engine::extensionPoint('FraudProtectionSignupsForm.save', $form);

        $form->setInfoMessage($this->_("Fraud protections saved"));
        return $form;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:30,代码来源:FraudprotectionSignupsForm.class.php


示例10: buildGroupBy

	protected function buildGroupBy($groupColumn) {
		$this->statsSelect->groupBy->add(self::TRANSACTIONS_PREFIX.'.groupColumn');
        $this->transactionsSelect->groupBy->add(Pap_Db_Table_Transactions::TRANSACTION_ID);
        $this->transactionsSelect->groupBy->add(Pap_Db_Table_Transactions::TIER);
        $transactionsStatsBuilderContext = new Pap_Stats_Computer_TransactionsStatsBuilderContext($this, $groupColumn);
        Gpf_Plugins_Engine::extensionPoint('Pap_Stats_Computer_TransactionsStatsBuilder.buildGroupBy', $transactionsStatsBuilderContext);
	}
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:TransactionsStatsBuilder.class.php


示例11: buildWhere

 protected function buildWhere()
 {
     parent::buildWhere();
     $this->_selectBuilder->where->add('l.logout', 'is', 'NULL', 'AND', false);
     $this->_selectBuilder->where->add(Gpf_Db_Table_LoginsHistory::LAST_REQUEST, '>', "('" . $this->createDatabase()->getDateString() . "' - INTERVAL 1800 SECOND)", 'AND', false);
     Gpf_Plugins_Engine::extensionPoint('Gpf_Report_OnlineUsers.buildWhere', $this->_selectBuilder->where);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:OnlineUsers.class.php


示例12: createMenu

	public function createMenu() {
		$this->addItem('Home', $this->_('Home'));

		$item = $this->addItem('Campaigns-Overview', $this->_('Campaigns'));
		$item->addItem('Campaigns-Overview', $this->_('Overview'));
		$item->addItem('Campaigns-Manager', $this->_('Campaigns Manager'));

		$item = $this->addItem('Banners-Overview', $this->_('Banners'));
		$item->addItem('Banners-Overview', $this->_('Overview'));
		$item->addItem('Banner-Manager', $this->_('Banners Manager'));

		$item = $this->addItem('Affiliates-Overview', $this->_('Affiliates'));
		$item->addItem('Affiliates-Overview', $this->_('Overview'));
		$item->addItem('Affiliate-Tree', $this->_('Affiliate tree'));
		$item->addItem('Affiliate-Manager', $this->_('Affiliates Manager'));
		$item->addItem('Direct-Links-Manager', $this->_('DirectLinks Urls'));

		$item = $this->addItem('Transactions-Overview', $this->_('Transactions'));
		$item->addItem('Transactions-Overview', $this->_('Overview'));
		$item->addItem('Clicks-List', $this->_('Raw clicks list'));
		$item->addItem('Transaction-Manager', $this->_('Commissions'));

		$item = $this->addItem('Reports', $this->_('Reports'));
		$item->addItem('Reports', $this->_('Overview'));
		$item->addItem('Quick-Report', $this->_('Quick report'));
		$item->addItem('Trends-Report', $this->_('Trends report'));
		$item->addItem('Daily-Report', $this->_('Daily report'));
		$item->addItem('Transaction-Manager', $this->_('Commissions'));
		$item->addItem('Clicks-List', $this->_('Raw clicks list'));
		$item->addItem('Payouts-History', $this->_('Payouts history'));
		$item->addItem('Payouts-By-Affiliate', $this->_('Payouts by affiliate'));
		$item->addItem('Online-Users', $this->_('Online users'));
		$item->addItem('Top-Affiliates', $this->_('Top affiliates'));
		$item->addItem('Top-referring-URLs', $this->_('Top referring URLs'));

		$item = $this->addItem('Payouts', $this->_('Payouts'));
		$item->addItem('Payouts', $this->_('Overview'));
		$item->addItem('Pay-Affiliates', $this->_('Pay affiliates'));

		$item = $this->addItem('Communication', $this->_('Emails'));
		$item->addItem('Communication', $this->_('Overview'));
		$item->addItem('Send-Message', $this->_('Send message'));
		$item->addItem('Mail-Outbox', $this->_('Mail outbox'));

		$this->addItem('Configuration-Manager', $this->_('Configuration'));

		$item = $this->addItem('Tools', $this->_('Tools'));
		$item->addItem('Tools', $this->_('Overview'));
		$item->addItem('Integration', $this->_('Integration'));
		$item->addItem('Logs-History', $this->_('Event logs'));
		$item->addItem('Logins-History', $this->_('Logins history'));
		$item->addItem('Import-Export', $this->_('Import / Export'));
		$item->addItem('Getting-Started', $this->_('Getting started'));
		$item->addItem('Visitor-Affiliates', $this->_('Visitor affiliates'));
		$item->addItem('Views', $this->_('Views'));
		$item->addItem('ReportProblems', $this->_('Report problems'));

		Gpf_Plugins_Engine::extensionPoint('PostAffiliate.merchant.menu', $this);
	}
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:59,代码来源:Menu.class.php


示例13: createActionsList

 protected static function createActionsList() {
     $list = Pap_Features_PerformanceRewards_ActionList::getInstance(true);
     $list->addAction('a1', 'Pap_Features_PerformanceRewards_Action_AddBonusCommAction', self::ACTION_PUT_ADD_BONUS);
     $list->addAction('a2', 'Pap_Features_PerformanceRewards_Action_ChangeGroup', self::ACTION_PUT_AFFILIATE_INTO_COMMISSION_GROUP);
     $list->addAction('a3', 'Pap_Features_PerformanceRewards_Action_ChangeGroupRetroactively', self::ACTION_PUT_AFFILIATE_INTO_COMMISSION_GROUP_RETROACTIVELY);
     
     Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Features.PerformanceRewards.Action.createActionList', $list);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:8,代码来源:Action.class.php


示例14: loadDefaultCountry

 /**
  * @service country read
  * @anonym
  * @return Gpf_Rpc_Data
  */
 public function loadDefaultCountry(Gpf_Rpc_Params $params)
 {
     $data = new Gpf_Rpc_Data($params);
     $context = new Gpf_Plugins_ValueContext(Gpf_Settings::get(Gpf_Settings_Gpf::DEFAULT_COUNTRY));
     Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Countries.getDefaultCountry', $context);
     $data->setValue('default', $context->get());
     return $data;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:13,代码来源:CountryForm.class.php


示例15: execute

 public function execute() {
     if(Gpf_Plugins_Engine::getInstance()->getConfiguration()->isPluginActive('AffiliateNetwork')){
         $Merchant = new Gpf_Db_Role();
         $Merchant->setId(Pap_Application::DEFAULT_ROLE_MERCHANT);
         $Merchant->load();
         $Merchant->setName('Network Owner');
         $Merchant->save();
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:9,代码来源:update_4.5.32.php


示例16: __construct

 public function __construct($name, $panelName = '')
 {
     Smarty::Smarty();
     $this->name = $name;
     $this->panelName = $panelName;
     $this->default_resource_type = 'template';
     $this->security = true;
     Gpf_Plugins_Engine::extensionPoint('Core.initSmarty', $this);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:9,代码来源:Smarty.class.php


示例17: initSelectClause

    protected function initSelectClause() {
        $this->selectBuilder->select->add(Pap_Db_Table_Transactions::R_STATUS, "status", 't');
        $this->selectBuilder->select->add(Pap_Db_Table_Transactions::PAYOUT_STATUS, "payoutstatus", 't');
        $this->selectBuilder->select->add("sum(if(t.".Pap_Db_Table_Transactions::TIER.">1,1,0))", "cnt");
        $this->selectBuilder->select->add("sum(t.".Pap_Db_Table_Transactions::COMMISSION.")", "commission");
        $this->selectBuilder->select->add("sum(if(t.tier>1,t.".Pap_Db_Table_Transactions::TOTAL_COST.",0))", "totalcost");

        Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Pap_Stats_Computer_Transactions.initSelectClause', $this->selectBuilder->select);
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:9,代码来源:TransactionsHigherTiers.class.php


示例18: buildWhere

 protected function buildWhere() {
     parent::buildWhere();
     $this->_selectBuilder->where->add('u.deleted', '=', Gpf::NO);
     $this->_selectBuilder->where->add('u.rtype', '=', Pap_Application::ROLETYPE_MERCHANT);
     if ($this->accountId != null) {
         $this->_selectBuilder->where->add('a.accountid', '=', $this->accountId);
     }
     Gpf_Plugins_Engine::extensionPoint('AffiliateNetwork.modifyWhere',
     new Gpf_Common_SelectBuilderCompoundRecord($this->_selectBuilder, new Gpf_Data_Record(array('columnPrefix'), array('a'))));
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:10,代码来源:AdminsGrid.class.php


示例19: check

    /**
     * checks for click fraud rules...
     *
     * @param Pap_Contexts_Click $context
     */
    public function check(Pap_Contexts_Click $context) {
        $context->debug('FraudProtection started');

        $this->checkBannedIP($context);
        $this->checkMultipleClicksFromSameIP($context);

        Gpf_Plugins_Engine::extensionPoint('FraudProtection.Click.check', $context);

        $context->debug('FraudProtection ended');
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:15,代码来源:FraudProtection.class.php


示例20: createSelectBuilder

    /**
     * @return Gpf_SqlBuilder_SelectBuilder
     */
    protected function createSelectBuilder() {
        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add('b.'.Pap_Db_Table_Banners::ID, self::ID);
        $selectBuilder->select->add('b.'.Pap_Db_Table_Banners::NAME, self::VALUE);
        $selectBuilder->from->add(Pap_Db_Table_Banners::getName(), 'b');

        Gpf_Plugins_Engine::extensionPoint('PostAffiliate.BannerListbox.getBannerSelect', $selectBuilder);

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Gpf_Rpc_Form类代码示例发布时间:2022-05-23
下一篇:
PHP Gpf_DbEngine_Row类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap