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


PHP jAcl2::clearCache方法代碼示例

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


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

示例1: onAuthLogout

 function onAuthLogout($event)
 {
     try {
         jAcl2::clearCache();
     } catch (Exception $e) {
     }
 }
開發者ID:hadrienl,項目名稱:jelix,代碼行數:7,代碼來源:jacl2db.listener.php

示例2: setRightsOnForum

 /**
  * set rights on the given forum
  * @param integer $group the group id.
  * @param array $rights list of rights key = subject, value = true
  * @param string $resource the resource corresponding to the "forum" string + id_forum
  */
 public static function setRightsOnForum($group, $rights, $resource)
 {
     $dao = jDao::get('jacl2db~jacl2rights', jAcl2Db::getProfile());
     $dao->deleteHfnuByGroup($group, $resource);
     foreach ($rights as $sbj => $val) {
         if ($val != '') {
             jAcl2DbManager::addRight($group, $sbj, $resource);
         }
     }
     jAcl2::clearCache();
 }
開發者ID:havefnubb,項目名稱:havefnubb,代碼行數:17,代碼來源:hfnuadminrights.class.php

示例3: logout

 /**
  * logout a user and delete the user in the php session
  */
 public static function logout()
 {
     $config = self::_getConfig();
     jEvent::notify('AuthLogout', array('login' => $_SESSION[$config['session_name']]->login));
     $_SESSION[$config['session_name']] = new jAuthDummyUser();
     try {
         jAcl::clearCache();
     } catch (Exception $e) {
     }
     try {
         jAcl2::clearCache();
     } catch (Exception $e) {
     }
     if (isset($config['persistant_enable']) && $config['persistant_enable']) {
         if (!isset($config['persistant_cookie_name'])) {
             throw new jException('jelix~auth.error.persistant.incorrectconfig', 'persistant_cookie_name, persistant_crypt_key');
         }
         setcookie($config['persistant_cookie_name'] . '[auth]', '', time() - 3600, $config['persistant_cookie_path']);
     }
 }
開發者ID:Calmacil,項目名稱:ffdvh,代碼行數:23,代碼來源:jAuth.class.php

示例4: removeSubject

 /**
  * Delete the given subject
  * @param string  $subject the key of the subject
  */
 public static function removeSubject($subject)
 {
     $p = jAcl2Db::getProfile();
     jDao::get('jelix~jacl2rights', $p)->deleteBySubject($subject);
     jDao::get('jelix~jacl2subject', $p)->delete($subject);
     jAcl2::clearCache();
 }
開發者ID:alienpham,項目名稱:helenekling,代碼行數:11,代碼來源:jAcl2DbManager.class.php

示例5: removeSubjectGroup

 /**
  * Delete the given subject
  * @param string  $subjectGroup the key of the subject group
  * @since 1.3
  */
 public static function removeSubjectGroup($subjectGroup)
 {
     jDao::get('jacl2db~jacl2subject', 'jacl2_profile')->removeSubjectFromGroup($subjectGroup);
     jDao::get('jacl2db~jacl2subjectgroup', 'jacl2_profile')->delete($subjectGroup);
     jAcl2::clearCache();
 }
開發者ID:havefnubb,項目名稱:havefnubb,代碼行數:11,代碼來源:jAcl2DbManager.class.php

示例6: testGetRightDisconnect

 public function testGetRightDisconnect()
 {
     jAuth::logout();
     jAcl2::clearCache();
     $this->assertFalse(jAcl2::check('super.cms.list'));
     $this->assertFalse(jAcl2::check('admin.access'));
     jAcl2::clearCache();
     jAcl2DbManager::addRight('__anonymous', 'super.cms.list');
     $this->assertTrue(jAcl2::check('super.cms.list'));
     $this->assertFalse(jAcl2::check('admin.access'));
     jAcl2::clearCache();
 }
開發者ID:hadrienl,項目名稱:jelix,代碼行數:12,代碼來源:jacl2.main_api.html_cli.php


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