当前位置: 首页>>代码示例>>PHP>>正文


PHP SessionCache::clear方法代码示例

本文整理汇总了PHP中SessionCache::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionCache::clear方法的具体用法?PHP SessionCache::clear怎么用?PHP SessionCache::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SessionCache的用法示例。


在下文中一共展示了SessionCache::clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: clear

 static function clear()
 {
     SessionCache::clear();
     SiteCache::clear();
     PageCache::clear();
     return;
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:7,代码来源:Cache.php

示例2: changePositions

 /**
  *
  * @param int $menu
  * @param string $item1
  * @param string $item2 
  */
 public static function changePositions($menu, $item1, $item2)
 {
     $entries = self::countEntries($menu);
     if ($item1 > 0 && $item2 > 0 && $item1 < $entries + 1 && $item2 < $entries + 1) {
         $item1 = DataBase::Current()->EscapeString($item1);
         $item2 = DataBase::Current()->EscapeString($item2);
         $menu = DataBase::Current()->EscapeString($menu);
         DataBase::Current()->Execute("UPDATE {'dbprefix'}menu SET id = -1 WHERE menuID = '" . $menu . "'  AND id = " . $item1);
         DataBase::Current()->Execute("UPDATE {'dbprefix'}menu SET id = " . $item1 . " WHERE menuID = '" . $menu . "'  AND id = " . $item2);
         DataBase::Current()->Execute("UPDATE {'dbprefix'}menu SET id = " . $item2 . " WHERE menuID = '" . $menu . "'  AND id = -1");
         SessionCache::clear();
     }
 }
开发者ID:srueegger,项目名称:1zu12bB,代码行数:19,代码来源:menu.php

示例3: logErrorAndClearCache

 private static function logErrorAndClearCache($errorMessage)
 {
     error_log($errorMessage);
     // Just to be sure: clear the cached config and JWKS.
     SessionCache::clear(self::$ANTI_FORGERY_STATE_TOKEN_CACHE_KEY);
     SessionCache::clear(self::$OPENID_CONFIG_CACHE_KEY);
     SessionCache::clear(self::$JWKS_CACHE_KEY);
     SessionCache::clear(self::$PARKED_JWT_CACHE_KEY);
 }
开发者ID:RobBosman,项目名称:bransom.RestServer-PHP,代码行数:9,代码来源:OpenIDConnect.class.php

示例4: clear

 static function clear($area = "", $key = "")
 {
     FileCache::clear($area, $key);
     SessionCache::clear($area, $key);
 }
开发者ID:srueegger,项目名称:1zu12bB,代码行数:5,代码来源:cache.php

示例5: display

 public function display()
 {
     SessionCache::clear();
     $template = new Template();
     $template->load("menu_edit");
     if (isset($_POST['add'])) {
         if (trim($_POST['newtitle']) != "") {
             if (trim($_POST['newurl']) != "") {
                 $entry = new MenuEntry();
                 $entry->menu = $_GET['menu'];
                 $entry->title = $_POST['newtitle'];
                 $entry->type = $_POST['type'];
                 if ($entry->type == 0) {
                     $entry->href = $_POST['newPage'];
                 } else {
                     if ($entry->type == 1) {
                         $entry->href = $_POST['newurl'];
                     } else {
                         $entry->href = $_POST['newMenu'];
                     }
                 }
                 $res = $entry->save();
                 if ($res) {
                     $template->assign_var("MESSAGE", Language::DirectTranslate("ENTRY_ADDED"));
                 } else {
                     $template->assign_var("MESSAGE", Language::DirectTranslate("ENTRY_NOT_ADDED"));
                 }
                 Cache::clear("menu");
             } else {
                 $template->assign_var("MESSAGE", Language::DirectTranslate("ENTER_LINK_TARGET"));
             }
         } else {
             $template->assign_var("MESSAGE", Language::DirectTranslate("ENTER_LINK_TITLE"));
         }
     } else {
         if (isset($_POST['save'])) {
             foreach ($_POST as $param => $value) {
                 if (strlen($param) >= 6) {
                     if (substr($param, -5, 5) == "_href") {
                         $entries[substr($param, 0, -5)]['href'] = $value;
                     } else {
                         if (strlen($param) >= 7 && substr($param, -6, 6) == "_title") {
                             $entries[substr($param, 0, -6)]['title'] = $value;
                         } else {
                             if (substr($param, -5, 5) == "_type") {
                                 $entries[substr($param, 0, -5)]['type'] = $value;
                             }
                         }
                     }
                 }
             }
             foreach ($entries as $id => $params) {
                 $entry = new MenuEntry();
                 $entry->id = $id;
                 $entry->menu = $_GET['menu'];
                 $entry->title = $params['title'];
                 $entry->href = $params['href'];
                 $entry->type = $params['type'];
                 $entry->save();
             }
         } else {
             if (isset($_GET['delete'])) {
                 Menu::deleteEntry(DataBase::Current()->EscapeString($_GET['menu']), DataBase::Current()->EscapeString($_GET['delete']));
             } else {
                 if (isset($_GET['moveup'])) {
                     Menu::changePositions($_GET['menu'], $_GET['moveup'], $_GET['moveup'] - 1);
                 } else {
                     if (isset($_GET['movedown'])) {
                         Menu::changePositions($_GET['menu'], $_GET['movedown'], $_GET['movedown'] + 1);
                     }
                 }
             }
         }
     }
     if (isset($_GET['menu'])) {
         $template->assign_var("URL", $this->page->getUrl("menu=" . urlencode($_GET['menu'])));
         $template->assign_var("EDITABLEMENU", Menu::getEditableCode(DataBase::Current()->EscapeString($_GET['menu'])));
     } else {
         $template->assign_var("URL", "");
         $template->assign_var("EDITABLEMENU", "");
     }
     $selector = new MenueSelector();
     $selector->name = 'newMenu';
     $selector->value = -1;
     $selector->style = 'width:200px;position:relative;left:-210px;visibility:hidden';
     $template->assign_var("MENUSELECTOR", $selector->getCode());
     $selector = new PageSelector();
     $selector->name = 'newPage';
     $selector->value = -1;
     $selector->style = 'width:200px;position:relative;left:-415px;';
     $template->assign_var("PAGESELECTOR", $selector->getCode());
     $template->assign_var("MESSAGE", "");
     $template->output();
 }
开发者ID:srueegger,项目名称:1zu12bB,代码行数:94,代码来源:menueditor.php

示例6: clear

 /**
  * Remove todos valores armazenados, mas mantem a session viva.
  */
 public function clear()
 {
     SessionCache::clear();
 }
开发者ID:alnetosilva,项目名称:novosga,代码行数:7,代码来源:Session.php


注:本文中的SessionCache::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。