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


PHP SessionManager::get方法代碼示例

本文整理匯總了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);
 }
開發者ID:boomcms,項目名稱:boom-core,代碼行數:14,代碼來源:Editor.php

示例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();
 }
開發者ID:WebDevJL,項目名稱:Portal,代碼行數:9,代碼來源:MenuSideSimple.php

示例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);
開發者ID:casati-dolibarr,項目名稱:corebos,代碼行數:31,代碼來源:webservice.php

示例4: unset

 /**
  * Permet de supprimer une clef de la session
  *
  * @param string $name
  */
 public static function unset($name)
 {
     SessionManager::get()->offsetUnset($name);
 }
開發者ID:quenti77,項目名稱:phq,代碼行數:9,代碼來源:Session.php

示例5: check

 public static function check()
 {
     return SessionManager::get('user') ? true : false;
 }
開發者ID:bachkoutou,項目名稱:Simple-MVC,代碼行數:4,代碼來源:AuthManager.php


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