本文整理汇总了PHP中SessionManager::get方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionManager::get方法的具体用法?PHP SessionManager::get怎么用?PHP SessionManager::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionManager
的用法示例。
在下文中一共展示了SessionManager::get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTime
/**
* Get the time to view pages at.
*
* @return DateTime
*/
public function getTime()
{
// Time should only be used with the history state.
if (!$this->isHistory()) {
return new DateTime('now');
}
$timestamp = $this->session->get($this->timePersistenceKey, time());
return (new DateTime())->setTimestamp($timestamp);
}
示例2: Init
public function Init()
{
$xmlFiles = $this->sessionManager->get("xml");
$this->fileParams["filePath"] = $xmlFiles->xml_menus;
$this->fileParams["rootNode"] = "menu";
$this->fileParams["menuId"] = "side";
$this->xml = new XmlLoader($this->fileParams);
$this->Render();
}
示例3: writeErrorOutput
$adoptSession = true;
} else {
writeErrorOutput($operationManager, new WebServiceException(WebServiceErrorCode::$AUTHREQUIRED, "Authentication required"));
return;
}
}
$sid = $sessionManager->startSession($sessionId, $adoptSession);
if (!$sessionId && !$operationManager->isPreLoginOperation()) {
writeErrorOutput($operationManager, new WebServiceException(WebServiceErrorCode::$AUTHREQUIRED, "Authentication required"));
return;
}
if (!$sid) {
writeErrorOutput($operationManager, $sessionManager->getError());
return;
}
$userid = $sessionManager->get("authenticatedUserId");
if ($userid) {
$seed_user = new Users();
$current_user = $seed_user->retrieveCurrentUserInfoFromFile($userid);
} else {
$current_user = null;
}
$operationInput = $operationManager->sanitizeOperation($input);
$includes = $operationManager->getOperationIncludes();
foreach ($includes as $ind => $path) {
checkFileAccessForInclusion($path);
require_once $path;
}
cbEventHandler::do_action('corebos.audit.action', array(isset($current_user) ? $current_user->id : 0, 'Webservice', $operation, 0, date('Y-m-d H:i:s')));
$rawOutput = $operationManager->runOperation($operationInput, $current_user);
writeOutput($operationManager, $rawOutput);
示例4: unset
/**
* Permet de supprimer une clef de la session
*
* @param string $name
*/
public static function unset($name)
{
SessionManager::get()->offsetUnset($name);
}
示例5: check
public static function check()
{
return SessionManager::get('user') ? true : false;
}