当前位置: 首页>>代码示例>>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;未经允许,请勿转载。