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


PHP XenForo_Application::setSimpleCacheData方法代码示例

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


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

示例1: _set

 protected function _set($users, $time = null)
 {
     if ($time == NULL) {
         $time = XenForo_Application::$time;
     }
     XenForo_Application::setSimpleCacheData(self::CACHE_KEY, array($time, $users));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:7,代码来源:OnlineUsers.php

示例2: verifyOption

 public static function verifyOption(array &$values, XenForo_DataWriter $dw, $fieldName)
 {
     if (!$values) {
         XenForo_Application::setSimpleCacheData('xengalleryStatisticsCache', false);
     }
     return true;
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:7,代码来源:StatisticsBlock.php

示例3: runCron

 public static function runCron()
 {
     $Model = XenForo_Model::create('Turki_Adv_Model_View');
     $Advs = $Model->getAllAdvHooks();
     $adv_xenforo = array("AdvsHook" => $Advs);
     XenForo_Application::setSimpleCacheData('adv_xenforo', $adv_xenforo);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:7,代码来源:Cache.php

示例4: verifyOption

 public static function verifyOption(&$value, XenForo_DataWriter $dw, $fieldName)
 {
     XenForo_Application::setSimpleCacheData('taigachat_lastUpdate', XenForo_Application::$time);
     /** @var Dark_TaigaChat_Model_TaigaChat */
     $taigaModel = XenForo_Model::create("Dark_TaigaChat_Model_TaigaChat");
     $taigaModel->regeneratePublicHtml($value);
     return true;
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:8,代码来源:Motd.php

示例5: removeCopyrightNotice

 /**
  *
  * @param array $matches
  * @return string
  */
 public static function removeCopyrightNotice(array $matches)
 {
     $copyrightModification = XenForo_Application::getSimpleCacheData(parent::COPYRIGHT_MODIFICATION_SIMPLE_CACHE_KEY);
     if ($copyrightModification < XenForo_Application::$time) {
         XenForo_Application::setSimpleCacheData(parent::COPYRIGHT_MODIFICATION_SIMPLE_CACHE_KEY, XenForo_Application::$time);
     }
     return $matches[0];
 }
开发者ID:ThemeHouse-XF,项目名称:BrandingRemove,代码行数:13,代码来源:InitDependencies.php

示例6: getAllCachedCollections

 public function getAllCachedCollections()
 {
     $collections = XenForo_Application::getSimpleCacheData(self::$allCacheKey);
     if (!$collections) {
         $collections = $this->getCollections();
         XenForo_Application::setSimpleCacheData(self::$allCacheKey, $collections);
     }
     return $collections;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:9,代码来源:Collection.php

示例7: getAllCachedFields

 public function getAllCachedFields()
 {
     $fields = XenForo_Application::getSimpleCacheData(self::$allCacheKey);
     if (!$fields) {
         $fields = $this->getFields();
         XenForo_Application::setSimpleCacheData(self::$allCacheKey, $fields);
     }
     return $fields;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:9,代码来源:Field.php

示例8: rebuildUserBannerGroupCache

 public function rebuildUserBannerGroupCache()
 {
     $userBannerGroups = $this->getUserBannerGroups();
     if ($userBannerGroups) {
         XenForo_Application::setSimpleCacheData('th_userBannerGroups', $userBannerGroups);
     } elseif (XenForo_Application::getSimpleCacheData('th_userBannerGroups')) {
         XenForo_Application::setSimpleCacheData('th_userBannerGroups', false);
     }
     return $userBannerGroups;
 }
开发者ID:ThemeHouse-XF,项目名称:UserBannerGrp,代码行数:10,代码来源:UserBannerGroup.php

示例9: uninstall

 public static function uninstall()
 {
     $db = XenForo_Application::get('db');
     $db->query("DROP TABLE IF EXISTS bbm");
     $db->query("DROP TABLE IF EXISTS bbm_buttons");
     if ($db->fetchRow('SHOW COLUMNS FROM xf_forum WHERE Field = ?', 'bbm_bm_editor')) {
         $db->query("ALTER TABLE xf_forum DROP bbm_bm_editor");
     }
     XenForo_Model::create('XenForo_Model_DataRegistry')->delete('bbm_buttons');
     XenForo_Application::setSimpleCacheData('bbm_active', false);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:11,代码来源:Installer.php

示例10: getAllNodes

 public function getAllNodes()
 {
     if ($this->_nodes === null) {
         $nodes = XenForo_Application::getSimpleCacheData(self::$nodesCacheKey);
         if ($nodes === false) {
             $nodes = $this->_getNodeModel()->getAllNodes();
             XenForo_Application::setSimpleCacheData(self::$nodesCacheKey, $nodes);
         }
         $this->_nodes = $nodes;
     }
     return $this->_nodes;
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:12,代码来源:Log.php

示例11: saveGroupPermDataCache

 public function saveGroupPermDataCache()
 {
     $groups = $this->getGroups();
     foreach ($groups as &$group) {
         if (!is_array($group['permissions'])) {
             $group['permissions'] = @unserialize($group['permissions']);
         }
     }
     if (!defined('TEAM_DATAREGISTRY_KEY')) {
         define('TEAM_DATAREGISTRY_KEY', 'Teams_group_perms');
     }
     XenForo_Application::setSimpleCacheData(TEAM_DATAREGISTRY_KEY, $groups);
     return $groups;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:14,代码来源:MemberGroup.php

示例12: runStatisticsUpdate

 /**
  * Updates statistics for XenForo Media Gallery.
  */
 public static function runStatisticsUpdate()
 {
     /** @var  $categoryModel XenGallery_Model_Category */
     $categoryModel = XenForo_Model::create('XenGallery_Model_Category');
     /** @var  $albumModel XenGallery_Model_Album */
     $albumModel = XenForo_Model::create('XenGallery_Model_Album');
     /** @var  $mediaModel XenGallery_Model_Media */
     $mediaModel = XenForo_Model::create('XenGallery_Model_Media');
     /** @var  $commentModel XenGallery_Model_Comment */
     $commentModel = XenForo_Model::create('XenGallery_Model_Comment');
     $statisticsCache = array('category_count' => $categoryModel->getCategoryCount(), 'album_count' => $albumModel->countAlbums(), 'upload_count' => $mediaModel->countMedia(array('media_type' => array('image_upload', 'video_upload')), array('join' => XenGallery_Model_Media::FETCH_ALBUM)), 'embed_count' => $mediaModel->countMedia(array('media_type' => 'video_embed'), array('join' => XenGallery_Model_Media::FETCH_ALBUM)), 'comment_count' => $commentModel->countComments(), 'disk_usage' => $mediaModel->calculateMediaDiskUsage());
     XenForo_Application::setSimpleCacheData('xengalleryStatisticsCache', $statisticsCache);
     return true;
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:17,代码来源:Statistics.php

示例13: rebuildChildNodesCache

 public static function rebuildChildNodesCache()
 {
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $nodeId = WidgetFramework_Option::get('indexNodeId');
     $childNodes = array();
     if ($nodeId > 0) {
         $widgetPage = $nodeModel->getNodeById($nodeId);
         if (!empty($widgetPage)) {
             $childNodes = $nodeModel->getChildNodes($widgetPage, true);
             XenForo_Application::setSimpleCacheData(self::SIMPLE_CACHE_CHILD_NODES, $childNodes);
         }
     }
     return $childNodes;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:14,代码来源:Index.php

示例14: getShortUrlLengthHttps

 public function getShortUrlLengthHttps($token)
 {
     $data = XenForo_Application::getSimpleCacheData(self::SIMPLE_CACHE_DATA_KEY_SHORT_URL_LENGTH_HTTPS);
     if (empty($data) or XenForo_Application::$time - $data['timestamp'] > 86400) {
         $response = bdSocialShare_Helper_Twitter::helpConfiguration($token['oauth_token'], $token['oauth_token_secret']);
         if (!empty($response['short_url_length_https'])) {
             $data = array('value' => $response['short_url_length_https'], 'timestamp' => time());
             XenForo_Application::setSimpleCacheData(self::SIMPLE_CACHE_DATA_KEY_SHORT_URL_LENGTH_HTTPS, $data);
         } else {
             // for some reason we cannot get configuration from Twitter,
             // return our best guess then: as of September 13, 2014 it is 23
             return 30;
         }
     }
     return $data['value'];
 }
开发者ID:Sywooch,项目名称:forums,代码行数:16,代码来源:Twitter.php

示例15: getInstances

 public static function getInstances()
 {
     if (!self::$_instance) {
         /* @var $self sonnbUpThread_Model_Up*/
         $self = self::create('sonnbUpThread_Model_Up');
         if (!$self->_nodes) {
             $nodes = XenForo_Application::getSimpleCacheData($self->_nodesCacheKey);
             if ($nodes === false) {
                 $nodes = $self->_getNodeModel()->getAllNodes();
                 XenForo_Application::setSimpleCacheData($self->_nodesCacheKey, $nodes);
             }
             $self->_nodes = $nodes;
         }
         self::$_instance = $self;
     }
     return self::$_instance;
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:17,代码来源:Up.php


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