本文整理汇总了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;
}
示例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();
?>
示例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;
}
}
示例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();
?>
示例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();
}
示例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();
示例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();
}
示例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());
示例9:
<?php
/**
* Perform quick task
*/
require_once 'bootstrap.php';
Gpf_Session::create();
$quickTaskRunner = new Gpf_Tasks_QuickTaskRunner();
$quickTaskRunner->executeTask();
?>