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


PHP Gpf_Settings::get方法代码示例

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


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

示例1: executeCurl

    protected function executeCurl($xmlRequest, $headers) {
        $url = '';
        if (!$this->containsProtocol(Gpf_Settings::get(BusinessCatalyst_Config::BC_DOMAIN_NAME))) {
            $url = 'http://';
        }

        $url .= Gpf_Settings::get(BusinessCatalyst_Config::BC_DOMAIN_NAME);

        if (!$this->endsWithSlash($url)) {
            $url .= '/';
        }

        $url .= 'catalystwebservice/catalystcrmwebservice.asmx';

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);

        $response = curl_exec($ch);
        if ($response === false) {
            Pap_Contexts_Action::getContextInstance()->debug('Error in communication with bc: ' . curl_error($ch));
            throw new Gpf_Exception(curl_error($ch));
        }
        return $response;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:27,代码来源:Retrieve.class.php

示例2: load

 /**
  * @anonym
  * @service custom_separator read
  * @param Gpf_Rpc_Params $params
  * @return Gpf_Rpc_Form
  */
 public function load(Gpf_Rpc_Params $params) {
     $form = new Gpf_Rpc_Form($params);
     $form->addField(self::PROCESS_WHOLE_CART_AS_ONE_TRANSACTION, Gpf_Settings::get(self::PROCESS_WHOLE_CART_AS_ONE_TRANSACTION));
     $form->addField(self::MERCHANT_ID, Gpf_Settings::get(self::MERCHANT_ID));
     $form->addField(self::API_SIGNATURE, Gpf_Settings::get(self::API_SIGNATURE));
     return $form;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:13,代码来源:Config.class.php

示例3: process

    public function process(Pap_Common_TransactionCompoundContext $context) {

        $transaction = $context->getTransaction();
        $context->getContext()->debug("SubaffiliateFirstSaleBonus started");
        if($transaction->getTier() != 2) {
            $context->getContext()->debug("SubaffiliateFirstSaleBonus ended - Not 2. tier");
            return;
        }

        $row = $this->getChildAffiliateInfo($transaction);

        $date = new Gpf_DateTime(time());
        $date->addDay(-Gpf_Settings::get(SubaffiliateFirstSaleBonus_Config::VALIDITY_DAYS));

        if(Gpf_Common_DateUtils::getDateTime($date->toTimeStamp()) > $row->get(Pap_Db_Table_Users::DATEINSERTED)) {
            $context->getContext()->debug("SubaffiliateFirstSaleBonus ended - Date Inserted is older than defined days.");
            return;
        }

        if($this->getChildAffiliateTransactionsCount($row->get(Pap_Db_Table_Transactions::USER_ID)) > 1) {
            $context->getContext()->debug("SubaffiliateFirstSaleBonus ended - Not user's first transaction.");
            return;
        }

        if(Gpf_Settings::get(SubaffiliateFirstSaleBonus_Config::BONUS_TYPE) == '%') {
            $transaction->setCommission($transaction->getCommission()+(Gpf_Settings::get(SubaffiliateFirstSaleBonus_Config::BONUS_AMOUNT)/100)*$transaction->getTotalCost());
        } else{
            $transaction->setCommission(Gpf_Settings::get(SubaffiliateFirstSaleBonus_Config::BONUS_AMOUNT)+$transaction->getCommission());
        }
        $context->getContext()->debug("SubaffiliateFirstSaleBonus ended - Success.");
        return;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:32,代码来源:Main.class.php

示例4: checkMultipleSignupsFromSameIp

    /**
     * checks for duplicate signups from same IP
     *
     * @return boolean
     */
    private function checkMultipleSignupsFromSameIp(Pap_Signup_SignupFormContext $context) {
        $checkIt = Gpf_Settings::get(Pap_Settings::REPEATING_SIGNUPS_SETTING_NAME);
        if($checkIt != Gpf::YES) {
            return true;
        }

        $checkPeriod = Gpf_Settings::get(Pap_Settings::REPEATING_SIGNUPS_SECONDS_SETTING_NAME);
        $checkAction = Gpf_Settings::get(Pap_Settings::REPEATING_SIGNUPS_ACTION_SETTING_NAME);
        if($checkPeriod == '' || $checkPeriod == '0' || !is_numeric($checkPeriod)) {
            return true;
        }
        if($checkAction != self::ACTION_DECLINE && $checkAction != self::ACTION_DONTSAVE) {
            return true;
        }

        $userObject = new Pap_Common_User();

        $recordsCount = $userObject->getNumberOfUsersFromSameIP($context->getIp(), $checkPeriod);
        if(($recordsCount > 0) && ($checkAction == self::ACTION_DONTSAVE)) {
            $context->getForm()->setErrorMessage($this->_("Not saved by fraud protection"));
            $context->setAllowSave(false);
            return false;
        } else if (($recordsCount > 0) && ($checkAction == self::ACTION_DECLINE)) {
            $context->getRow()->setStatus(Gpf_Db_User::DECLINED);
        }
        return true;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:32,代码来源:FraudProtection.class.php

示例5: load

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

        $form->setField(Pap_Settings::BANNEDIPS_LIST_SIGNUPS,
        Gpf_Settings::get(Pap_Settings::BANNEDIPS_LIST_SIGNUPS));

        $form->setField(Pap_Settings::BANNEDIPS_SIGNUPS,
        Gpf_Settings::get(Pap_Settings::BANNEDIPS_SIGNUPS));

        $form->setField(Pap_Settings::BANNEDIPS_SIGNUPS_ACTION,
        Gpf_Settings::get(Pap_Settings::BANNEDIPS_SIGNUPS_ACTION));

        $form->setField(Pap_Settings::REPEATING_SIGNUPS_SETTING_NAME,
        Gpf_Settings::get(Pap_Settings::REPEATING_SIGNUPS_SETTING_NAME));

        $form->setField(Pap_Settings::REPEATING_SIGNUPS_SECONDS_SETTING_NAME,
        Gpf_Settings::get(Pap_Settings::REPEATING_SIGNUPS_SECONDS_SETTING_NAME));

        $form->setField(Pap_Settings::REPEATING_SIGNUPS_ACTION_SETTING_NAME,
        Gpf_Settings::get(Pap_Settings::REPEATING_SIGNUPS_ACTION_SETTING_NAME));

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

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

示例6: readRequestVariables

    public function readRequestVariables() {
        $postvars = '';
        foreach ($_POST as $key => $value) {
            $value = stripslashes(stripslashes($value));
            $postvars .= "$key=$value; ";
        }
        $this->debug("  SolidTrustPay callback: POST variables: $postvars");

        $request = $this->getRequestObject();
        $cookieValue = stripslashes($request->getPostParam('user'.Gpf_Settings::get(SolidTrustPay_Config::CUSTOM_ITEM_NUMBER)));
        try {
            $customSeparator = Gpf_Settings::get(SolidTrustPay_Config::CUSTOM_SEPARATOR);
            if ($customSeparator != '') {
                $explodedCookieValue = explode($customSeparator, $cookieValue, 2);
                if (count($explodedCookieValue) == 2) {
                    $cookieValue = $explodedCookieValue[1];
                }
            }
        } catch (Gpf_Exception $e) {
        }
        $this->setCookie($cookieValue);
        
        $this->setTotalCost($request->getPostParam('amount'));
        $this->setTransactionID($request->getPostParam('tr_id'));
        $this->setProductID($request->getPostParam('item_id'));
        $this->setPaymentStatus($request->getPostParam('status'));
        if ($request->getPostParam('status') == '') {
            $this->setPaymentStatus($request->getPostParam('Status'));
        }
        $this->setCurrency($request->getPostParam('currency'));
        $this->setData1($request->getPostParam('memo'));
        $this->setData2($request->getPostParam('payerAccount'));
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:33,代码来源:Tracker.class.php

示例7: getDatabase

 /**
  * @return Gpf_DbEngine_Database
  */
 public static function getDatabase()
 {
     if (self::$database === null) {
         self::create(Gpf_Settings::get(Gpf_Settings_Gpf::DB_HOSTNAME), Gpf_Settings::get(Gpf_Settings_Gpf::DB_USERNAME), Gpf_Settings::get(Gpf_Settings_Gpf::DB_PASSWORD), Gpf_Settings::get(Gpf_Settings_Gpf::DB_DATABASE));
     }
     return self::$database;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:10,代码来源:Database.class.php

示例8: loadTree

    /**
     * @service affiliate_panel_settings read
     * @param $fields
     */
    public function loadTree(Gpf_Rpc_Params $params) {
        $data = new Gpf_Rpc_Data($params);

        $data->setValue(Pap_Settings::AFFILIATE_MENU, Gpf_Settings::get(Pap_Settings::AFFILIATE_MENU));

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

示例9: normalizePassword

 /**
  * Add minimum one character into password from string includeCharacters
  * if it doesn't contain already such character
  *
  * @param $settingName
  * @param $includeCharacters
  * @param $password
  * @return unknown_type
  */
 private static function normalizePassword($settingName, $includeCharacters, $password)
 {
     if (Gpf_Settings::get($settingName) == Gpf::YES && !preg_match('/[' . preg_quote($includeCharacters) . ']/', $password)) {
         $password[rand(0, strlen($password) - 1)] = $includeCharacters[rand(0, strlen($includeCharacters) - 1)];
     }
     return $password;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:16,代码来源:String.class.php

示例10: getValidityInSeconds

    private function getValidityInSeconds() {
        $validity = Gpf_Settings::get(Pap_Settings::IP_VALIDITY_SETTING_NAME);
        if($validity == '' || $validity == '0' || !is_numeric($validity)) {
            throw new Gpf_Exception("    IP address validity period is not correct: '$validity'");
        }
        $validityPeriod = Gpf_Settings::get(Pap_Settings::IP_VALIDITY_FORMAT_SETTING_NAME);
        if(!in_array($validityPeriod, array(Pap_Merchants_Config_TrackingForm::VALIDITY_DAYS,
        Pap_Merchants_Config_TrackingForm::VALIDITY_HOURS,
        Pap_Merchants_Config_TrackingForm::VALIDITY_MINUTES))) {
            throw new Gpf_Exception("    IP address validity period is not correct: '$validityPeriod'");
        }

        switch($validityPeriod) {
            case Pap_Merchants_Config_TrackingForm::VALIDITY_DAYS:
                return $validity * 86400;
                 
            case Pap_Merchants_Config_TrackingForm::VALIDITY_HOURS:
                return $validity * 3600;
                 
            case Pap_Merchants_Config_TrackingForm::VALIDITY_MINUTES:
                return $validity * 60;
                 
            default: return 0;
        }
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:25,代码来源:RecognizeVisitorAffiliateFromIp.class.php

示例11: loadItems

    protected function loadItems($userId)  {
        $maxTiers = Gpf_Settings::get(Pap_Settings::TIERS_VISIBLE_TO_AFFILIATE);
        if ($maxTiers == -1) {
            return parent::loadItems($userId);
        }

        $currentUserId = Gpf_Session::getAuthUser()->getPapUserId();
        $numberOfTiers = -1;
        if($userId != '') {
            try {
                $numberOfTiers = $this->getNumberOfTiersToAncestor($userId, $currentUserId);
            } catch (Gpf_Exception $e) {
            }
        }

        if ($userId == '' && $maxTiers == 0) {
            return new Gpf_Data_RecordSet();
        }

        if ($numberOfTiers >= $maxTiers-2) {
            $lastTier = true;
        } else {
            $lastTier = false;
        }
        return parent::loadItems($userId, $lastTier);

    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:27,代码来源:SubAffiliatesTree.class.php

示例12: load

	/**
	 * @service affiliate_signup_setting read
	 * @param $fields
	 */
	public function load(Gpf_Rpc_Params $params) {
		$form = new Gpf_Rpc_Form($params);
		$form->setField(Pap_Settings::POST_SIGNUP_TYPE_SETTING_NAME, Gpf_Settings::get(Pap_Settings::POST_SIGNUP_TYPE_SETTING_NAME));

		$form->setField(Pap_Settings::POST_SIGNUP_URL_SETTING_NAME, Gpf_Settings::get(Pap_Settings::POST_SIGNUP_URL_SETTING_NAME));

		$form->setField(Pap_Settings::SIGNUP_TERMS_SETTING_NAME, Gpf_Settings::get(Pap_Settings::SIGNUP_TERMS_SETTING_NAME));

		$form->setField(Pap_Settings::FORCE_TERMS_ACCEPTANCE_SETTING_NAME, Gpf_Settings::get(Pap_Settings::FORCE_TERMS_ACCEPTANCE_SETTING_NAME));

		$form->setField(Pap_Settings::INCLUDE_PAYOUT_OPTIONS, Gpf_Settings::get(Pap_Settings::INCLUDE_PAYOUT_OPTIONS));

		$form->setField(Pap_Settings::PAYOUT_OPTIONS, Gpf_Settings::get(Pap_Settings::PAYOUT_OPTIONS));

		$form->setField(Pap_Settings::FORCE_PAYOUT_OPTION, Gpf_Settings::get(Pap_Settings::FORCE_PAYOUT_OPTION));

		$form->setField('assignAffiliateTo', Gpf_Settings::get(Pap_Settings::ASSIGN_NON_REFERRED_AFFILIATE_TO));

		//		$form->setField(self::OPTIONAL_PAYOUT_FIELDS,
		//		Gpf_Settings::get(self::OPTIONAL_PAYOUT_FIELDS));

		$form->setField(Pap_Settings::AFFILIATE_APPROVAL, Gpf_Settings::get(Pap_Settings::AFFILIATE_APPROVAL));

		Gpf_Plugins_Engine::extensionPoint('PostAffiliate.AffiliateSignupForm.load', $form);

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

示例13: updateCompressedCommissionsTask

 private function updateCompressedCommissionsTask($recurrencePreset) {
     if (Gpf_Settings::get(Pap_Features_CompressedCommissionPlacementModel_Definition::PROCESSING_ENABLED) == Gpf::YES) {
         $this->insertCompressedCommissionsTask($recurrencePreset);
     } else {
         $this->removeCompressedCommissionsTask();
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:CompressedCommissionsSettingsForm.class.php

示例14: report

 /**
  * @service report_problem write
  * 
  * @param Gpf_Rpc_Params $params
  * @return Gpf_Rpc_Form
  */
 public function report(Gpf_Rpc_Params $params) {
     $form = new Gpf_Rpc_Form($params);
     
     $subject = 'PAP4: '.$form->getFieldValue('subject');
     
     $message = 'License: '.$form->getFieldValue('licenseId').'<br>'.
                'Product: <b>'.Gpf_Settings::get(Pap_Settings::BRANDING_TEXT_POST_AFFILIATE_PRO).' '.Gpf_Settings::get(Gpf_Settings_Gpf::VARIATION).'</b><br>'.
                'Version: <b>'.Gpf_Application::getInstance()->getVersion().'</b><br>'.
                'Url: <a href="'.Gpf_Paths::getInstance()->getFullBaseServerUrl().'">'.Gpf_Paths::getInstance()->getFullBaseServerUrl().'</a><br>'.
                '-------------------------------------------------------------------------------<br>'.
                $form->getFieldValue('message');
     
     $mail = new Gpf_Db_Mail();
     $mail->setSubject($subject);
     $mail->setHtmlBody($message);
     $mail->setFromMail($form->getFieldValue('email'));
     $mail->setRecipients("support@qualityunit.com");
     
     try {
         $mail->insert();
         $mail->scheduleNow(true);
         $form->setInfoMessage($this->_("Email sent"));
     } catch (Exception $e) {
         $form->setErrorMessage($this->_("Error while sending mail"));
     }
     return $form;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:33,代码来源:ReportProblem.class.php

示例15: addCommission

 	public function addCommission(Pap_Contexts_Signup $signupContext) {
 	    if (($user = $signupContext->getUserObject()) == null) {
 	        return;
 	    } 
 	    
 	    $campaignId = Gpf_Settings::get(SignupActionCommissions_Config::AFTER_SIGNUP_ACTION_CAMPAIGNID);
 	    $actionCode = Gpf_Settings::get(SignupActionCommissions_Config::AFTER_SIGNUP_ACTION_CODE);
 	    
 	    if ($actionCode == '') {
 	        Gpf_Log::error('SignupActionCommissions plugin: No Action code set');
 	        return;
 	    }
        
 	    $saleTracker = new Pap_Tracking_ActionTracker();
 	    
        $action = $saleTracker->createAction($actionCode);
        $action->setAffiliateID($user->getId());    
        $action->setStatus($user->getStatus());
        $action->setOrderId(SignupActionCommissions_Config::DEFAULT_ORDER_ID);
        if ($campaignId != '') {
          $action->setCampaignID($campaignId);
        }
        try {
            $saleTracker->register();
        } catch (Gpf_Exception $e) {
            Gpf_Log::error('SignupActionCommissions plugin: '.$e->getMessage());
        }
        
 	}
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:29,代码来源:Main.class.php


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