本文整理汇总了PHP中Sessions::setSessionByToken方法的典型用法代码示例。如果您正苦于以下问题:PHP Sessions::setSessionByToken方法的具体用法?PHP Sessions::setSessionByToken怎么用?PHP Sessions::setSessionByToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sessions
的用法示例。
在下文中一共展示了Sessions::setSessionByToken方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doRpc
$pvtKey = isset($data->server->pvtKey) ? $data->server->pvtKey : '';
$token = isset($data->server->token) ? $data->server->token : '';
}
include_once '../registry.php';
include_once '../sites/' . $site . '/conf.php';
include_once '../dataProvider/Modules.php';
include_once '../dataProvider/Applications.php';
include_once '../classes/Sessions.php';
include_once 'config.php';
$modules = new Modules();
$app = new Applications();
$appAccess = $app->hasAccess($pvtKey);
$API = array_merge($API, $modules->getEnabledModulesAPI());
if (isset($token)) {
$s = new Sessions();
$userAccess = $s->setSessionByToken($token);
}
function doRpc($cdata)
{
global $API;
global $appAccess;
try {
if (!$appAccess) {
throw new Exception('Access Denied: Please make sure API Key is typed correctly in the settings tab');
}
if (!isset($API[$cdata->action])) {
throw new Exception('Call to undefined action: ' . $cdata->action);
}
$action = $cdata->action;
$a = $API[$action];
doAroundCalls($a['before'], $cdata);