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


PHP Session::renew方法代碼示例

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


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

示例1: renew

 /**
  * Used to renew a session id
  *
  * In your controller: $this->Session->renew();
  *
  * @return void
  */
 public function renew()
 {
     return Session::renew();
 }
開發者ID:ripzappa0924,項目名稱:carte0.0.1,代碼行數:11,代碼來源:SessionComponent.php

示例2: logout

 /**
  * Log a user out.
  *
  * Returns the logout action to redirect to. Triggers the `Auth.logout` event
  * which the authenticate classes can listen for and perform custom logout logic.
  * AuthComponent will remove the session data, so there is no need to do that
  * in an authentication object. Logging out will also renew the session id.
  * This helps mitigate issues with session replays.
  *
  * @return string Normalized config `logoutRedirect`
  * @link http://book.cakephp.org/3.0/en/controllers/components/authentication.html#logging-users-out
  */
 public function logout()
 {
     $this->_setDefaults();
     if (empty($this->_authenticateObjects)) {
         $this->constructAuthenticate();
     }
     $user = (array) $this->user();
     $this->dispatchEvent('Auth.logout', [$user]);
     $this->session->delete($this->sessionKey);
     $this->session->delete('Auth.redirect');
     $this->session->renew();
     return Router::normalize($this->_config['logoutRedirect']);
 }
開發者ID:aoliverio,項目名稱:bookmarker-tutorial,代碼行數:25,代碼來源:AuthComponent.php

示例3: renew

 /**
  * Used to renew a session id
  *
  * In your controller: $this->Session->renew();
  *
  * @return void
  */
 public function renew()
 {
     $this->_session->renew();
 }
開發者ID:maitrepylos,項目名稱:nazeweb,代碼行數:11,代碼來源:SessionComponent.php

示例4: delete

 /**
  * Delete user record from session.
  *
  * The session id is also renewed to help mitigate issues with session replays.
  *
  * @return void
  */
 public function delete()
 {
     $this->_user = false;
     $this->_session->delete($this->_config['key']);
     $this->_session->renew();
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:13,代碼來源:SessionStorage.php


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