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


PHP Zend_Auth_Storage_Session::clear方法代碼示例

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


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

示例1: logoutAction

 public function logoutAction()
 {
     $storage = new Zend_Auth_Storage_Session('company_type');
     $storage->clear();
     $this->_flashMessenger->addMessage('<div class="div-success">You have logged out successfully</div>');
     $this->_redirect('company/auth/');
 }
開發者ID:vmangla,項目名稱:evendor,代碼行數:7,代碼來源:AuthController.php

示例2: logoutAction

 /**
  * destroys Auth data, destroys Session data, redirect to home page
  */
 public function logoutAction()
 {
     $sess = Zend_Registry::get('session');
     $sess->transfers = array();
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/index');
 }
開發者ID:graniasty,項目名稱:imap_zend,代碼行數:11,代碼來源:MultiController.php

示例3: logout

 /**
  * Logout
  *
  * @return void 
  */
 public function logout()
 {
     // Register logout in the access log, clear session and redirect to the public index page
     $this->_accessLog->insertAccessLog(Admin_View_Helper_Authentication::getLoggedUserName(), Enum_ActivityType::Logout);
     $storage = new Zend_Auth_Storage_Session('www.beyourlight.co.uk');
     $storage->clear();
 }
開發者ID:Ewaldaz,項目名稱:Be-your-light,代碼行數:12,代碼來源:User.php

示例4: logoutAction

 public function logoutAction()
 {
     $this->_helper->Session->setUserSession(null);
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/login');
 }
開發者ID:redaumore,項目名稱:promociones,代碼行數:7,代碼來源:AuthController.php

示例5: clear

 public function clear()
 {
     if ($this->_session) {
         parent::clear();
     }
 }
開發者ID:shevron,項目名稱:stoa,代碼行數:6,代碼來源:LazySession.php

示例6: deleteSession

 /**
  * Delete current session datas
  *
  * @param boolean $force : force removing persistent session (default false)
  * @return void
  * @access public
  * @static
  */
 static function deleteSession($force = false)
 {
     //clear session storage
     $authStorage = new Zend_Auth_Storage_Session('atm-auth');
     $authStorage->clear();
     //clear session table
     $sql = "\n\t\t\tdelete\n\t\t\tfrom\n\t\t\t\tsessions\n\t\t\twhere\n\t\t\t\tphpid_ses='" . io::sanitizeSQLString(Zend_Session::getId()) . "'\n\t\t";
     if (!$force) {
         //keep session with persistent cookie
         $sql .= "\n\t\t\t\tand (\n\t\t\t\t\tUNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastTouch_ses) > " . io::sanitizeSQLString(APPLICATION_SESSION_TIMEOUT) . "\n\t\t\t\t\tand cookie_expire_ses = '0000-00-00 00:00:00'\n\t\t\t\t) or (\n\t\t\t\t\tcookie_expire_ses != '0000-00-00 00:00:00'\n\t\t\t\t\tand TO_DAYS(NOW()) >= cookie_expire_ses\n\t\t\t\t)\n\t\t\t";
     } else {
         //remove autologin cookie if exists
         if (isset($_COOKIE[CMS_session::getAutoLoginCookieName()])) {
             //remove cookie
             CMS_session::setCookie(CMS_session::getAutoLoginCookieName());
         }
     }
     $q = new CMS_query($sql);
     //remove phpMyAdmin cookies if any
     @setcookie(session_name(), false, time() - 3600, PATH_REALROOT_WR . '/automne/phpMyAdmin/', '', 0);
     @setcookie('phpMyAdmin', false, time() - 3600, PATH_REALROOT_WR . '/automne/phpMyAdmin/', '', 0);
     return true;
 }
開發者ID:davidmottet,項目名稱:automne,代碼行數:31,代碼來源:session.php

示例7: logoutAction

 public function logoutAction()
 {
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     $this->_redirect('auth/login');
 }
開發者ID:nguyenkiet,項目名稱:cafeteria,代碼行數:6,代碼來源:AuthController.php

示例8: logoutAction

 public function logoutAction()
 {
     $this->Member->log('Signed out', 'Members');
     $storage = new Zend_Auth_Storage_Session();
     $storage->clear();
     unset($_SESSION['Member'], $_SESSION['Role']);
     session_destroy();
     $this->_redirect('/admin');
 }
開發者ID:hoaitn,項目名稱:base-zend,代碼行數:9,代碼來源:MemberController.php

示例9: clear

 /**
  * Clears contents from local and persistent storage
  */
 public function clear()
 {
     if (null !== $this->read()) {
         $em = $this->getEntityManager();
         $em->remove($this->session);
         $em->flush();
         $this->session = null;
     }
     parent::clear();
 }
開發者ID:epixa,項目名稱:Epixa,代碼行數:13,代碼來源:Doctrine.php


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