當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gpf_Session::create方法代碼示例

本文整理匯總了PHP中Gpf_Session::create方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gpf_Session::create方法的具體用法?PHP Gpf_Session::create怎麽用?PHP Gpf_Session::create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gpf_Session的用法示例。


在下文中一共展示了Gpf_Session::create方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getSessionId

 public function getSessionId()
 {
     $sessionId = $this->get(self::SESSION_ID);
     if ($sessionId === null || strlen(trim($sessionId)) == 0) {
         Gpf_Session::create(new Gpf_ApiModule());
     }
     return $sessionId;
 }
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:8,代碼來源:PapApi.class.php

示例2: Pap_Tracking_ModuleBase

<?php
/**
 * Processes Eway request
 */

require_once '../../scripts/bootstrap.php';

Gpf_Session::create(new Pap_Tracking_ModuleBase());
	
$tracker = Eway_Tracker::getInstance();
$tracker->process();
?>
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:12,代碼來源:eway.php

示例3: authenticate

	public function authenticate($username, $password) {
		try {
			$userId = $this->findUserId($username, $password);
			$this->user = new Pap_Common_User();
			$this->user->setId($userId);
			$this->user->load();

			Gpf_Session::create(new Pap_Tracking_ModuleBase());
			$this->computeTimeOffset();

		} catch (Gpf_Exception $e) {
			Gpf_Log::warning($e->getMessage());
			$this->user = null;
		}
	}
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:15,代碼來源:Data.class.php

示例4: Pap_Tracking_ModuleBase

<?php

require_once 'bootstrap.php';
Gpf_Session::create(new Pap_Tracking_ModuleBase(), null, false);

try {
    $replicator = new Pap_Features_SiteReplication_Replicator();
} catch (Gpf_Exception $e) {
    die('<h3 style="color: red;">Error: '.$e->getMessage().'</h3>');
}

if (!$replicator->shouldBeProcessed()) {
    $replicator->passthru();
    exit();
}

echo $replicator->getReplicatedContent();

?>
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:19,代碼來源:page.php

示例5: initSession

 protected function initSession()
 {
     $sessionId = null;
     if (array_key_exists('S', $_REQUEST) && $_REQUEST['S'] != '') {
         $sessionId = $_REQUEST['S'];
     }
     Gpf_Session::create($this, $sessionId);
     $this->checkApplication();
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:9,代碼來源:Core.php

示例6: microtime

<?php
/**
 * Upgrading from PAP3 database
 */

require_once '../../scripts/bootstrap.php';

$time1 = microtime();

$papsid = null; 
if (isset($_COOKIE['M_pap_sid'])) {
    $papsid = $_COOKIE['M_pap_sid'];
}
Gpf_Session::create(new Pap_Merchant(), $papsid);
$authuser = Gpf_Session::getAuthUser();
if (!$authuser->isLogged() || !$authuser->isExists()) {
    exit('For runnign migration, you need to be logged in your merchant panel.');
}
if (!$authuser->hasPrivilege(Pap_Privileges::TRANSACTION, Pap_Privileges::P_WRITE) ||
!$authuser->hasPrivilege(Pap_Privileges::TRANSACTION, Pap_Privileges::P_DELETE) ||
!$authuser->hasPrivilege(Pap_Privileges::AFFILIATE, Pap_Privileges::P_WRITE) ||
!$authuser->hasPrivilege(Pap_Privileges::AFFILIATE, Pap_Privileges::P_DELETE)) {
    exit('For runnign migration, you need to be logged as merchant with particular privileges.');
}

$migration = new Pap3Compatibility_Migration_UpgradeFromPap3();
$finished = false;

try {

	$migration->run();
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:31,代碼來源:pap3topap4.php

示例7: loginFromSession

	private function loginFromSession($session){
		Gpf_Session::create(null, $session);
		$papAlertData = new Pap_Alert_Data();
		$papAlertData->computeTimeOffset();

		$this->user = new Pap_Common_User();
		try {
			$this->user->setId(Gpf_Session::getAuthUser()->getPapUserId());
		} catch (Exception $e) {
			throw new Gpf_Rpc_SessionExpiredException();
		}
		$this->user->load();
		$this->initializeApplication();
	}
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:14,代碼來源:ResponseManager.class.php

示例8: Pap_Merchant

<?php
/**
 * Register sale/lead/action
 *
 * Sale tracking is made completely using plugins, every action is performed by a plugin
 */

require_once 'bootstrap.php';

Gpf_Session::create(new Pap_Merchant(), null, false);
	
$request = new Pap_Tracking_ActionRequest();
$tracker = Pap_Tracking_ActionTracker::getInstance();
$tracker->setAccountId($request->getAccountId());
$tracker->setRefererUrl($request->getRefererUrl());
$tracker->setVisitorId($request->getVisitorId());
$tracker->setTrackMethod(Pap_Common_Transaction::TRACKING_METHOD_3RDPARTY_COOKIE);

$action = $tracker->createAction($request->getRawActionCode());
$action->setTotalCost($request->getRawTotalCost());
$action->setOrderId($request->getRawOrderId());
$action->setProductId($request->getRawProductId());
for ($i=1; $i<=5; $i++) {
    $action->setData($i, $request->getRawExtraData($i));
}
$action->setAffiliateId($request->getRawAffiliateId());
$action->setCampaignId($request->getRawCampaignId());
$action->setCustomCommission($request->getRawCustomCommission());
$action->setStatus($request->getRawCustomStatus());
$action->setCouponCode($request->getRawCoupon());
$action->setChannelId($request->getChannelId());
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:31,代碼來源:action.php

示例9:

<?php
/**
 * Perform quick task
 */

require_once 'bootstrap.php';
Gpf_Session::create();

$quickTaskRunner = new Gpf_Tasks_QuickTaskRunner();
$quickTaskRunner->executeTask();
?>
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:11,代碼來源:do.php


注:本文中的Gpf_Session::create方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。